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

add Xbox detection

#fix 139
This commit is contained in:
Denis Demchenko
2016-05-09 10:40:47 +03:00
parent 5321a33cbe
commit 542277ceb7
2 changed files with 11 additions and 2 deletions

View File

@@ -45,6 +45,7 @@
, versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i)
, tablet = /tablet/i.test(ua)
, mobile = !tablet && /[^-]mobi/i.test(ua)
, xbox = /xbox/i.test(ua)
, result
if (/opera|opr|opios/i.test(ua)) {
@@ -295,10 +296,12 @@
} else if (iosdevice) {
result[iosdevice] = t
result.ios = t
} else if (windows) {
result.windows = t
} else if (mac) {
result.mac = t
} else if (xbox) {
result.xbox = t
} else if (windows) {
result.windows = t
} else if (linux) {
result.linux = t
}