How to use the bowser.msie 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 OneSignal / OneSignal-Website-SDK / src / utils.js View on Github external
export function isPushNotificationsSupported () {
  if (Browser.ios || Browser.ipod || Browser.iphone || Browser.ipad)
    return false;

  if (Browser.msedge || Browser.msie)
    return false;

  /* Firefox on Android push notifications not supported until at least 48: https://bugzilla.mozilla.org/show_bug.cgi?id=1206207#c6 */
  if (Browser.firefox && Number(Browser.version) < 48 && (Browser.mobile || Browser.tablet)) {
    return false;
  }

  if (Browser.firefox && Number(Browser.version) >= 44)
    return true;

  if (Browser.safari && Number(Browser.version) >= 7.1)
    return true;

  // Android Chrome WebView
  if (navigator.appVersion.match(/ wv/))
    return false;
github google / marzipano / src / controls / HammerGestures.js View on Github external
HammerGestures.prototype._createManager = function(element, type) {
  var manager = new Hammer.Manager(element);

  // Managers are created with different parameters for different pointer
  // types.
  if (type === 'mouse') {
    manager.add(new Hammer.Pan({ direction: Hammer.DIRECTION_ALL, threshold: 0 }));
  }
  else if (type === 'touch' || type === 'pen' || type === 'kinect') {
    // On touch one wants to have both panning and pinching. The panning
    // recognizer needs a threshold to allow the pinch to be recognized.
    manager.add(new Hammer.Pan({ direction: Hammer.DIRECTION_ALL, threshold: 20, pointers: 1 }));
    if (!(browser.msie && parseFloat(browser.version) < 10)) {
      // Do not add pinch to IE8-9 to prevent focus issues which prevent wheel scrolling from
      // working.
      manager.add(new Hammer.Pinch());
    }
  }

  return manager;
};
github dataarts / virtual-art-sessions / static / src / js / pages / session.js View on Github external
function init(options) {
  $loading.addClass('is-visible');
  const engine = Engine.create();
  const viewer = App.create(engine);
  const modal = modals.get('artist');
  const loadStartTime = new Date().getTime();

  modal.events.onOpen.add(handleArtistOpen_);
  modal.events.onClose.add(handleArtistClose_);

  if (window.location.hash === BIO_HASH) {
    modal.open();
  }

  if (bowser.msie) {
    $enterFullscreen.hide();
  }

  viewer.load(options.sessionSlug).then(sketch => {
    const now = new Date().getTime();
    const loadEndTime = now - loadStartTime;

    var timeToScreen = null;

    $loading.removeClass('is-visible');
    sketchPlayer = new SketchPlayer(viewer, sketch);
    progressBar = new SketchProgressBar($progress, sketchPlayer);

    initEvents_();
    initSpeed_();
    setTimestamp_();
github LLK / scratch-gui / src / lib / supported-browser.js View on Github external
const supportedBrowser = () => {
    if (bowser.msie) {
        return false;
    }
    return true;
};
github regular-ui / regular-ui / src / js / unit / dateTimePicker.js View on Github external
this.$watch('minDate', function(newValue, oldValue) {
            if(!newValue)
                return;

            if(typeof newValue === 'string') {
                if(bowser.msie && bowser.version <= 9)
                    return this.data.date = polyfill.StringDate(newValue);
                return this.data.minDate = new Date(newValue);
            }

            if(newValue == 'Invalid Date' || newValue == 'NaN')
                throw new TypeError('Invalid Date');
        });
github VirgilSecurity / virgil-crypto-javascript / src / browser / sign-then-encrypt-async.js View on Github external
export function signThenEncryptAsync (data, privateKey, recipientId, publicKey) {
	if (browser.msie || browser.msedge) {
		return new Promise((resolve, reject) => {
			try {
				resolve(signThenEncrypt(data, privateKey, recipientId, publicKey));
			} catch (e) {
				reject(e.message);
			}
		});
	} else {
		let recipients;

		if (Array.isArray(recipientId)) {
			recipients = recipientId;
		} else {
			recipients = [{
				recipientId: recipientId,
				publicKey: publicKey
github VirgilSecurity / virgil-crypto-javascript / src / browser / encrypt-with-key-multi-recipients-async.js View on Github external
export function encryptWithKeyMultiRecipientsAsync (initialData, recipients) {
	if (browser.msie || browser.msedge) {
		return new Promise((resolve, reject) => {
			try {
				resolve(encryptWithKeyMultiRecipients(initialData, recipients));
			} catch (e) {
				reject(e.message);
			}
		});
	} else {
		if (recipients.length === 0) {
			throwVirgilError('10000', {
				error: 'Cannot encrypt data, "recipients" array is empty.'
			});
		}

		recipients = recipients.map((r) => {
			return {
github LLK / scratch-www / src / lib / supported-browser.js View on Github external
export default function () {
    return !bowser.msie;
}
github cloverstudio / Spika / web / src / client / js / Views / Main / Messaging / FileUploader.js View on Github external
FileUploader.prototype.startUploadingFile = function(event){

    //this.uploadFileIFrame();
    
    if (browser.msie && browser.version < 10) {
        
        
        this.uploadFileIFrame();return;
        
    } else {
        
        files = event.target.files;
        if(files.length > 0){
            this.uploadFileHTML5(files[0]);
        }
           
    }

};