diff options
Diffstat (limited to 'localwebsite/htdocs/assets')
-rw-r--r-- | localwebsite/htdocs/assets/app.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/localwebsite/htdocs/assets/app.js b/localwebsite/htdocs/assets/app.js index da5052d..c08490f 100644 --- a/localwebsite/htdocs/assets/app.js +++ b/localwebsite/htdocs/assets/app.js @@ -41,4 +41,22 @@ function extend(a, b) { function ge(id) { return document.getElementById(id); -}
\ No newline at end of file +} + +(function() { + var ua = navigator.userAgent.toLowerCase(); + window.browserInfo = { + version: (ua.match(/.+(?:me|ox|on|rv|it|ra|ie)[\/: ]([\d.]+)/) || [0,'0'])[1], + //opera: /opera/i.test(ua), + msie: (/msie/i.test(ua) && !/opera/i.test(ua)) || /trident/i.test(ua), + mozilla: /firefox/i.test(ua), + android: /android/i.test(ua), + mac: /mac/i.test(ua), + samsungBrowser: /samsungbrowser/i.test(ua), + chrome: /chrome/i.test(ua), + safari: /safari/i.test(ua), + mobile: /iphone|ipod|ipad|opera mini|opera mobi|iemobile|android/i.test(ua), + operaMini: /opera mini/i.test(ua), + ios: /iphone|ipod|ipad|watchos/i.test(ua) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1), + }; +})(); |