JSFiddle - React, Tailwind, and code Playground
JavaScript
function actualBrowser() {
// Opera 8.0+ (UA detection to detect Blink/v8-powered Opera)
isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
if(isOpera) return 1;
// Firefox 1.0+
isFirefox = typeof InstallTrigger !== 'undefined';
if(isFirefox) return 2;
// Safari 3.0+
isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || safari.pushNotification);
if(isSafari) return 3;
// Internet Explorer 6-11
isIE = /*@cc_on!@*/false || !!document.documentMode;
if(isIE) return 4;
// Edge 20+
isEdge = !isIE && !!window.StyleMedia;
if(isEdge) return 5;
// Chrome 1+
isChrome = !!window.chrome && !!window.chrome.webstore;
if(isChrome) return 6;
// Blink engine detection
isBlink = (isChrome || isOpera) && !!window.CSS;
if(isBlink) return 7;
return 0;
};
var actualBrowser = actualBrowser();
console.log(actualBrowser);