var BrowserHelper = { /** * Ertelemszeruen mindegyik valtozo azt jelenti, aminek hivjak. */ isOpera: false, isFirefox: false, isSafari: false, isIE: false, isEdge: false, isChrome: false, isBlink: false, isAndroid: false, /** * Beallitja a valtozokat es ha szukseges, kirak egy figyelmeztetest, hogy a user nyisson masik bongeszot. */ init: function() { // Opera 8.0+ this.isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; // Firefox 1.0+ this.isFirefox = typeof InstallTrigger !== 'undefined'; // At least Safari 3+: "[object HTMLElementConstructor]" this.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; // Internet Explorer 6-11 this.isIE = /*@cc_on!@*/false || !!document.documentMode; // Edge 20+ this.isEdge = !this.isIE && !!window.StyleMedia; // Chrome 1+ //this.isChrome = !!window.chrome && !!window.chrome.webstore; this.isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); // Blink engine detection this.isBlink = (this.isChrome || this.isOpera) && !!window.CSS; // Android engine detection this.isAndroid = this.getAndroidVersion() !== false; //output the current browser console.log(this.browserVersion()); $(document).ready(function() { // partly supported browsers if (!BrowserHelper.isChrome && !BrowserHelper.isFirefox && !isMobile.any()) { BrowserHelper.outputHalfSupportedText(); } // mobile browsers if (typeof isMobile != 'undefined' && isMobile.any()) { BrowserHelper.outputMobileText(); } // not supported browsers if (false) { BrowserHelper.outputNotSupportedText(); } }); }, /** * Android eseten visszaadja annak verziojat, egyebkent hamisat ad. */ getAndroidVersion: function(ua) { ua = (ua || navigator.userAgent).toLowerCase(); var match = ua.match(/android\s([0-9\.]*)/); return match ? match[1] : false; }, /** * Visszaadja a bongeszo tipusat a verzioszammal egyutt. */ browserVersion: function () { var ua= navigator.userAgent, tem, M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; if(/trident/i.test(M[1])){ tem= /\brv[ :]+(\d+)/g.exec(ua) || []; return 'IE '+(tem[1] || ''); } if(M[1]=== 'Chrome'){ tem= ua.match(/\b(OPR|Edge)\/(\d+)/); if(tem!= null) return tem.slice(1).join(' ').replace('OPR', 'Opera'); } M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?']; if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]); return M.join(' '); }, /** * Kitesz egy piros csikot az oldal tetejere a megfelelo szoveggel es bezarasi lehetoseggel. */ outputHalfSupportedText: function() { $('body').append('