an additional way to detect android when in desktopmode
This commit is contained in:
1 parent
b4ae7fb985
commit
ff9658b3bb
1 file changed
+10
+10
@@ -1733,6 +1733,16 @@
|
||||
};
|
||||
|
||||
function detectOperatingSystem() {
|
||||
/*
|
||||
* Chrome im "Desktop-Modus" auf Android sendet einen
|
||||
* Desktop-UA (z.B. X11; Linux). Client Hints verraten
|
||||
* das echte System. Firefox/Safari kennen sie nicht.
|
||||
*/
|
||||
const hints = navigator.userAgentData;
|
||||
if (hints && hints.platform === "Android") {
|
||||
return OS_NAMES.Android;
|
||||
}
|
||||
|
||||
/*
|
||||
* iPadOS tarnt sich als macOS.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user