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

small code simplification

This commit is contained in:
BendingBender
2014-02-26 00:22:58 +01:00
parent 745c38b758
commit 2e5dbd10b3
3 changed files with 5 additions and 5 deletions

View File

@@ -161,7 +161,7 @@
}
// OS version extraction
var osVersion;
var osVersion = '';
if (ios) {
osVersion = getVersion(/os (\d+([_\s]\d+)*) like mac os x/i);
osVersion = osVersion.replace(/[_\s]/g, '.');
@@ -183,7 +183,7 @@
}
// device type extraction
var osMajorVersion = (osVersion || '').split('.')[0];
var osMajorVersion = osVersion.split('.')[0];
if (tablet || ipad || (android && (osMajorVersion == 3 || (osMajorVersion == 4 && !mobile))) || rimtablet || silk || touchpad) {
result.tablet = t
} else if (iphone || ipod || (android && mobile) || windowsphone || blackberry || webos || bada || tizen || mobile) {