How to use the bowser.version 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 AGProjects / sylkserver / resources / html / webrtcgateway / js / sylkrtc.js View on Github external
var browser = require('bowser'),
	debug = require('debug')('rtcninja:Adapter'),
	debugerror = require('debug')('rtcninja:ERROR:Adapter'),

	// Internal vars
	getUserMedia = null,
	RTCPeerConnection = null,
	RTCSessionDescription = null,
	RTCIceCandidate = null,
	MediaStreamTrack = null,
	getMediaDevices = null,
	attachMediaStream = null,
	canRenegotiate = false,
	oldSpecRTCOfferOptions = false,
	browserVersion = Number(browser.version) || 0,
	isDesktop = !!(!browser.mobile && !browser.tablet),
	hasWebRTC = false,
	virtGlobal, virtNavigator;

debugerror.log = console.warn.bind(console);

// Dirty trick to get this library working in a Node-webkit env with browserified libs
virtGlobal = global.window || global;
// Don't fail in Node
virtNavigator = virtGlobal.navigator || {};


// Constructor.

function Adapter(options) {
	// Chrome desktop, Chrome Android, Opera desktop, Opera Android, Android native browser
github OneSignal / OneSignal-Website-SDK / src / helpers / EnvironmentInfoHelper.ts View on Github external
private static getBrowserVersion() : number {
        return Number(bowser.version);
    }
github regular-ui / regular-ui / src / js / unit / input2.js View on Github external
config: function() {
        _.extend(this.data, {
            value: '',
            type: '',
            placeholder: '',
            state: '',
            maxlength: undefined,
            unit: '',
            rules: [],
            validating: false,
            autofocus: false,
            _eltIE9: bowser.msie && bowser.version <= 9
        });
        this.supr();

        var $outer = this.$outer;
        if($outer && $outer instanceof Validation) {
            $outer.controls.push(this);

            this.$on('destroy', function() {
                var index = $outer.controls.indexOf(this);
                $outer.controls.splice(index, 1);
            });
        }
    },
    /**
github instructure / instructure-ui / lib / components / Modal / ModalContent / index.js View on Github external
render () {
    const { size, children, ...props } = this.props

    const ie11 = bowser.msie && bowser.version > 10

    return (
github cloverstudio / Spika / web / src / client / js / Views / Main / Messaging / FileUploader.js View on Github external
FileUploader.prototype.handleClick = function(){
    
    if (browser.msie && browser.version < 10) {
    
        var self = this;
                       
        var params = {
                
            userID:LoginUserManager.user.get('id'),
            token:LoginUserManager.user.get('token'),
            localID:'',
            roomID:LoginUserManager.roomID,
            type:CONST.MESSAGE_TYPE_FILE
            
        };
        
        FileUploadDialog.show(UrlGenerator.sendFile(),params,function(){
            self.startUploadingFile();
        });
github Jam3 / nyg-jam3 / templates / src / util / detect.js View on Github external
const checkBrowserMajorVersion = () => parseInt(bowser.version, 10);
const checkDevicePixelRatio = () => window.devicePixelRatio;