mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-17 07:31:51 +03:00
fix: Xbox OS detection
It is better to detect Xbox devices as having the OS "Xbox". Otherwise, they are detected as "Windows 10", making it difficult to see the difference between Legacy Edge on Windows and the Xbox browser. (Karma (https://github.com/karma-runner/karma) only shows the browser & OS on the status line.) With this change, Xbox 360, Xbox One, Xbox X/S, and Xbox Series X/S are all detected as OS "Xbox" with version "360", "One", etc.
This commit is contained in:
@@ -719,6 +719,9 @@
|
||||
|
||||
os : [[
|
||||
|
||||
// Xbox, consider this before other Windows-based devices
|
||||
/(xbox);\s+xbox\s([^\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S)
|
||||
|
||||
// Windows based
|
||||
/microsoft\s(windows)\s(vista|xp)/i // Windows (iTunes)
|
||||
], [NAME, VERSION], [
|
||||
|
||||
Reference in New Issue
Block a user