diff options
author | Devaev Maxim <[email protected]> | 2018-11-27 12:05:38 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-11-27 12:05:38 +0300 |
commit | 1897d72b5191ba88130f99feec302ea95b4ce6cd (patch) | |
tree | 39b235ae1182aca7fd667577868a65ba9dc9f6b8 /web/js/tools.js | |
parent | b5ca09f310ade56ead145db4aee892d50cfd6386 (diff) |
refactoring
Diffstat (limited to 'web/js/tools.js')
-rw-r--r-- | web/js/tools.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/js/tools.js b/web/js/tools.js index bb8310be..81970ef8 100644 --- a/web/js/tools.js +++ b/web/js/tools.js @@ -108,6 +108,14 @@ var tools = new function() { // https://stackoverflow.com/questions/9038625/detect-if-device-is-ios var is_ios = (!!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform)); + // Any browser on Mac + var is_mac = (( + window.navigator.oscpu + || window.navigator.platform + || window.navigator.appVersion + || "Unknown" + ).indexOf("Mac") !== -1); + return { "is_opera": is_opera, "is_firefox": is_firefox, @@ -115,6 +123,7 @@ var tools = new function() { "is_chrome": is_chrome, "is_blink": is_blink, "is_ios": is_ios, + "is_mac": is_mac, }; }; this.info("Browser:", this.browser); |