Advertisement
machrus

Untitled

Jul 8th, 2020
966
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Opera 8.0+
  2. var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
  3.  
  4. // Firefox 1.0+
  5. var isFirefox = typeof InstallTrigger !== 'undefined';
  6.  
  7. // Safari 3.0+ "[object HTMLElementConstructor]"
  8. var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification));
  9.  
  10. // Internet Explorer 6-11
  11. var isIE = /*@cc_on!@*/false || !!document.documentMode;
  12.  
  13. // Edge 20+
  14. var isEdge = !isIE && !!window.StyleMedia;
  15.  
  16. // Chrome 1 - 79
  17. var isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
  18.  
  19. // Edge (based on chromium) detection
  20. var isEdgeChromium = isChrome && (navigator.userAgent.indexOf("Edg") != -1);
  21.  
  22. // Blink engine detection
  23. var isBlink = (isChrome || isOpera) && !!window.CSS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement