How to use the bowser.firefox 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 LivelyKernel / lively.next / lively.morphic / events / Event.js View on Github external
rightMouseButtonPressed() {
    // return this.domEvt ? (this.domEvt.buttons || 0) & 2 : false;
    return bowser.firefox ?
      (this.domEvt.which === 3 || this.domEvt.buttons === 2) :
      this.domEvt.which === 3 || this.domEvt.buttons === 2
  }
github eface2face / rtcninja.js / lib / Adapter.js View on Github external
RTCIceCandidate = virtGlobal.RTCIceCandidate;
		MediaStreamTrack = virtGlobal.MediaStreamTrack;
		if (MediaStreamTrack && MediaStreamTrack.getSources) {
			getMediaDevices = MediaStreamTrack.getSources.bind(MediaStreamTrack);
		} else if (virtNavigator.getMediaDevices) {
			getMediaDevices = virtNavigator.getMediaDevices.bind(virtNavigator);
		}
		attachMediaStream = function (element, stream) {
			element.src = URL.createObjectURL(stream);
			return element;
		};
		canRenegotiate = true;
		oldSpecRTCOfferOptions = false;
	// Old Firefox desktop, old Firefox Android.
	} else if (
		(browser.firefox && browserVersion < 47) ||
		(virtNavigator.mozGetUserMedia && virtGlobal.mozRTCPeerConnection)
	) {
		hasWebRTC = true;
		getUserMedia = virtNavigator.mozGetUserMedia.bind(virtNavigator);
		mediaDevices = virtNavigator.mediaDevices;
		RTCPeerConnection = virtGlobal.mozRTCPeerConnection;
		RTCSessionDescription = virtGlobal.mozRTCSessionDescription;
		RTCIceCandidate = virtGlobal.mozRTCIceCandidate;
		MediaStreamTrack = virtGlobal.MediaStreamTrack;
		attachMediaStream = function (element, stream) {
			element.src = URL.createObjectURL(stream);
			return element;
		};
		canRenegotiate = false;
		oldSpecRTCOfferOptions = false;
	// Modern Firefox desktop, modern Firefox Android.
github Jam3 / nyg-jam3 / templates / src / util / detect.js View on Github external
const isWindows = bowser.windows === true;
const isLinux = bowser.linux === true;
const isChromeOS = bowser.chromeos === true;

// Device flags
const isPhone = bowser.mobile === true;
const isTablet = bowser.tablet === true;
const isMobile = isPhone || isTablet;
const isDesktop = !isMobile;
const isiPhone = isiOS && bowser.iphone === true;
const isiPad = isiOS && bowser.ipad === true;
const isiPod = isiOS && bowser.ipod === true;

// Browser flags
const isChrome = bowser.chrome === true;
const isFirefox = bowser.firefox === true;
const isSafari = bowser.safari === true;
const isEdge = bowser.msedge === true;
const isIE = bowser.msie === true;
const isOpera = bowser.opera === true;

const checkDevice = () => {
  if (isPhone) return 'phone';
  if (isTablet) return 'tablet';
  if (isDesktop) return 'desktop';
  return '';
};

const checkOSName = () => {
  if (isiOS) return 'ios';
  if (isAndroid) return 'android';
  if (isFirefoxOS) return 'firefoxos';
github zenorocha / document.queryCommandSupported / test / queryCommandSupported.js View on Github external
it('cut should be supported on Opera 30+', function() {
                assert.equal(document.queryCommandSupported('cut'), true);
            });
        }
        else {
            it('copy should not be supported on Opera 29-', function() {
                assert.equal(document.queryCommandSupported('copy'), false);
            });

            it('cut should not be supported on Opera 29-', function() {
                assert.equal(document.queryCommandSupported('cut'), false);
            });
        }
    }

    if (bowser.firefox) {
        if (bowser.version >= 41) {
            it('copy should be supported on Firefox 41+', function() {
                assert.equal(document.queryCommandSupported('copy'), true);
            });

            it('cut should be supported on Firefox 41+', function() {
                assert.equal(document.queryCommandSupported('cut'), true);
            });
        }
        else {
            it('copy should not be supported on Firefox 40-', function() {
                assert.equal(document.queryCommandSupported('copy'), false);
            });

            it('cut should not be supported on Firefox 40-', function() {
                assert.equal(document.queryCommandSupported('cut'), false);
github fuse-box / fuse-box / modules / dgram / Socket.js View on Github external
var UDPBrowserTypes;
(function (UDPBrowserTypes) {
    UDPBrowserTypes[UDPBrowserTypes["ChromeSocketUDP"] = 0] = "ChromeSocketUDP";
    UDPBrowserTypes[UDPBrowserTypes["ChromeSocketsUDP"] = 1] = "ChromeSocketsUDP";
    UDPBrowserTypes[UDPBrowserTypes["FirefoxUDP"] = 2] = "FirefoxUDP";
})(UDPBrowserTypes || (UDPBrowserTypes = {}));
var browserUDP = false;
if (bowser.chrome) {
    if (chrome.sockets.tcp) {
        browserUDP = UDPBrowserTypes.ChromeSocketsUDP;
    }
    else if (chrome.socket) {
        browserUDP = UDPBrowserTypes.ChromeSocketUDP;
    }
}
if (bowser.firefox) {
    if (navigator.mozUDPSocket) {
        browserUDP = UDPBrowserTypes.FirefoxUDP;
    }
}
var NotInThisBrowserError = /** @class */ (function (_super) {
    __extends(NotInThisBrowserError, _super);
    function NotInThisBrowserError(message, inner_error) {
        var _this = this;
        message = "Method not implemented in this browser: " + (message ? message : "");
        _this = _super.call(this, message) || this;
        return _this;
    }
    return NotInThisBrowserError;
}(Error));
/**
 * @since Chrome 33
github Wonder-Technology / Wonder.js / dist / commonjs / renderer / worker / render_file / texture / TextureWorkerSystem.js View on Github external
})
            .flatMap(function (blob) {
            var flipY = textureUtils_1.getFlipY(index, TextureWorkerData);
            return Operator_1.fromPromise(_createImageBitmap(blob, {
                imageOrientation: flipY === true ? "flipY" : "none"
            }));
        });
    });
};
var _createImageBitmap = null;
if (bowser_1.chrome) {
    _createImageBitmap = function (blob, options) {
        return createImageBitmap(blob, options);
    };
}
else if (bowser_1.firefox) {
    _createImageBitmap = function (blob, options) {
        return createImageBitmap(blob);
    };
}
exports.initData = function (buffer, TextureCacheWorkerData, TextureWorkerData) {
    TextureCacheWorkerSystem_1.initData(TextureCacheWorkerData);
    TextureWorkerData.index = 0;
    TextureWorkerData.glTextures = [];
    TextureWorkerData.sourceMap = [];
    _initBufferWorkerData(buffer, TextureWorkerData);
};
var _initBufferWorkerData = function (buffer, TextureWorkerData) {
    textureUtils_1.createTypeArrays(buffer, textureUtils_1.getBufferCount(), TextureWorkerData);
};
//# sourceMappingURL=TextureWorkerSystem.js.map
github zenorocha / document.queryCommandSupported / src / queryCommandSupported.js View on Github external
if (bowser.version >= 43) {
                return true;
            }

            return false;
        }

        if (bowser.opera) {
            if (bowser.version >= 30) {
                return true;
            }

            return false;
        }

        if (bowser.firefox && bowser.version < 41) {
            return false;
        }
    }

    return _queryCommandSupported.apply(this, arguments);
};