1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

adds MacOS support

This commit is contained in:
rkurbatov
2017-05-18 00:41:09 +03:00
parent 98538362b3
commit b066f9bdeb
2 changed files with 14 additions and 0 deletions

View File

@@ -358,6 +358,9 @@
osVersion = getWindowsVersion(getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i))
} else if (result.windowsphone) {
osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);
} else if (result.mac) {
osVersion = getFirstMatch(/Mac OS X (\d+([_\.\s]\d+)*)/i);
osVersion = osVersion.replace(/[_\s]/g, '.');
} else if (iosdevice) {
osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i);
osVersion = osVersion.replace(/[_\s]/g, '.');