How to use the bowser.check function in bowser

To help you get started, we’ve selected a few bowser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenNeuroOrg / openneuro / app / src / scripts / common / partials / happybrowser.jsx View on Github external
_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
  }
github OpenNeuroOrg / openneuro / app / src / scripts / common / partials / happybrowser.jsx View on Github external
_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
  }
github RTCEngine / RTCEngine-js-sdk / lib / device.js View on Github external
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
		}
github OpenNeuroOrg / openneuro / packages / openneuro-app / src / scripts / common / partials / happybrowser.jsx View on Github external
_incompatibleBrowser(ua) {
    return !bowser.check(
      { chrome: '40', chromium: '40', googlebot: '0', firefox: '50' },
      true,
      ua || window.navigator.userAgent,
    )
  }
github micromaomao / schsrch / view / appstate.js View on Github external
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'
  })
}
github havfo / multiparty-meeting / app / lib / components / Stats.jsx View on Github external
_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);
		}
	}
github peterjoseph / Reeve / client / app.js View on Github external
browserVersionCheck() {
		const isSupported = bowser.check(MINIMUM_BROWSER_VERSIONS);
		if (!isSupported) {
			notify.show(t("error.outdatedBrowser"), "warning", -1);
		}
	}
github micromaomao / schsrch / view / appstate.js View on Github external
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'
  })
}