UNPKG

browserama

Version:

A browser detection package that uses feature detection instead of user agent

2 lines (1 loc) 972 B
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):e.browserama=r()}(this,function(){"use strict";var e="undefined"==typeof window,r=!1,t=!1,o=!1,i=!1,n=!1,d=!1,u=!1,w=!1,s=!1,m=!1;return e||(r="undefined"!=typeof InstallTrigger,t=!!window.chrome,o=!!window.chrome,i=t&&!window.chrome.webstore&&!window.chrome.runtime,n=0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")||window.safari&&window.safari.pushNotification,d=!!window.opr&&!!window.opr.addons||!!window.opera,u=!!window.StyleMedia,w=t&&!!navigator.userAgent.match(/edg/i),s=(o||d)&&!!window.CSS,m=!(t||n||r||d||!document.documentMode)),{get isChrome(){return o},get isChromeOrChromium(){return t},get isChromium(){return i},get isFirefox(){return r},get isSafari(){return n},get isOpera(){return d},get isEdge(){return u},get isEdgeChromium(){return w},get isIE(){return m},get isBlink(){return s}}});