Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_incompatibleBrowser(ua) {
const check = bowser.check(
{ chrome: '49', chromium: '49', googlebot: '0', firefox: '50' },
true,
ua || window.navigator.userAgent,
)
if (
bowser.check({ chrome: '41' }, true, ua || window.navigator.userAgent)
) {
// Also allow Chrome 41 even though uploading does not work
// This is for Googlebot to index correctly
return false
}
return !check
}
_incompatibleBrowser(ua) {
const check = bowser.check(
{ chrome: '49', chromium: '49', googlebot: '0', firefox: '50' },
true,
ua || window.navigator.userAgent,
)
if (
bowser.check({ chrome: '41' }, true, ua || window.navigator.userAgent)
) {
// Also allow Chrome 41 even though uploading does not work
// This is for Googlebot to index correctly
return false
}
return !check
}
DeviceManager._supported = false
// Chrome, Chromium (desktop and mobile).
if (bowser.check({ chrome: '55' }, true, ua))
{
DeviceManager._flag = 'chrome'
DeviceManager._supported = true
}
// Firefox (desktop and mobile).
else if (bowser.check({ firefox: '50' }, true, ua))
{
DeviceManager._flag = 'firefox'
DeviceManager._supported = true
}
// Safari (desktop and mobile).
else if (bowser.check({ safari: '11' }, true, ua))
{
DeviceManager._flag = 'safari'
DeviceManager._supported = true
}
// Edge (desktop).
else if (bowser.check({ msedge: '11' }, true, ua))
{
DeviceManager._flag = 'msedge'
DeviceManager._supported = true
}
// Opera (desktop and mobile).
if (bowser.check({ opera: '44' }, true, ua))
{
DeviceManager._flag = 'opera'
DeviceManager._supported = true
}
_incompatibleBrowser(ua) {
return !bowser.check(
{ chrome: '40', chromium: '40', googlebot: '0', firefox: '50' },
true,
ua || window.navigator.userAgent,
)
}
AppState.shouldResponseKeyboardShortcut = () => {
let { focusingInput } = AppState
return !focusingInput && !(document.activeElement && document.activeElement.contentEditable === 'true')
}
AppState.sspdfDecacheVersion = 2
AppState.isSafari = bowser.safari || bowser.ios
if (AppState.isSafari) {
AppState.supportSspdfView = bowser.check({
safari: '9'
})
AppState.supportOverall = bowser.check({
safari: '9'
})
} else {
AppState.supportSspdfView = bowser.check({
msie: '11',
chrome: '35',
firefox: '50'
})
AppState.supportOverall = bowser.check({
msie: '11',
chrome: '29',
firefox: '23'
})
}
_processStats(stats)
{
if (browser.check({ chrome: '58' }, true))
{
this._processStatsChrome58(stats);
}
else if (browser.check({ chrome: '40' }, true))
{
this._processStatsChromeOld(stats);
}
else if (browser.check({ firefox: '40' }, true))
{
this._processStatsFirefox(stats);
}
else
{
logger.warn('_processStats() | unsupported browser [name:"%s", version:%s]',
browser.name, browser.version);
}
}
browserVersionCheck() {
const isSupported = bowser.check(MINIMUM_BROWSER_VERSIONS);
if (!isSupported) {
notify.show(t("error.outdatedBrowser"), "warning", -1);
}
}
AppState.sspdfDecacheVersion = 2
AppState.isSafari = bowser.safari || bowser.ios
if (AppState.isSafari) {
AppState.supportSspdfView = bowser.check({
safari: '9'
})
AppState.supportOverall = bowser.check({
safari: '9'
})
} else {
AppState.supportSspdfView = bowser.check({
msie: '11',
chrome: '35',
firefox: '50'
})
AppState.supportOverall = bowser.check({
msie: '11',
chrome: '29',
firefox: '23'
})
}