Fix detection of Android

This commit is contained in:
James 2018-10-16 21:55:09 +11:00
parent 7b35cf9edd
commit fec99710cb

View file

@ -119,13 +119,12 @@
} }
fetchReleases(); fetchReleases();
// Attempt autodetection of their operating system // Attempt autodetection of their operating system
var userAgent = navigator.userAgent.toLowerCase(); var userAgent = navigator.userAgent.toLowerCase();
var allPlatforms = ["windows", "mac", "linux"]; var allPlatforms = ["windows", "mac", "linux"];
var os = undefined; var os = "Other";
if (userAgent.indexOf("windows") !== -1) { if (userAgent.indexOf("windows") !== -1) {
os = "Windows"; os = "Windows";
} else if (userAgent.indexOf("mac") !== -1 && userAgent.indexOf("mobile") === -1 && userAgent.indexOf("phone") === -1) { } else if (userAgent.indexOf("mac") !== -1 && userAgent.indexOf("mobile") === -1 && userAgent.indexOf("phone") === -1) {