mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #10371 from overleaf/jpa-pdf-caching-disable-in-opera
[web] pdf-caching: disable pdf-caching in Opera browser GitOrigin-RevId: 8c0cefc4fa4fccd74c58649c000be14643788514
This commit is contained in:
parent
381cdf34ce
commit
aeade59677
1 changed files with 8 additions and 0 deletions
|
@ -5,8 +5,16 @@ if (!hasTextEncoder) {
|
|||
console.warn('TextEncoder is not available. Disabling pdf-caching.')
|
||||
}
|
||||
|
||||
const isOpera =
|
||||
Array.isArray(navigator.userAgentData?.brands) &&
|
||||
navigator.userAgentData.brands.some(b => b.brand === 'Opera')
|
||||
if (isOpera) {
|
||||
console.warn('Browser cache is limited in Opera. Disabling pdf-caching.')
|
||||
}
|
||||
|
||||
function isFlagEnabled(flag) {
|
||||
if (!hasTextEncoder) return false
|
||||
if (isOpera) return false
|
||||
return getMeta('ol-splitTestVariants')?.[flag] === 'enabled'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue