summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorhackademix2020-02-29 19:03:39 +0100
committerhackademix2020-02-29 19:03:39 +0100
commite6af4b07c12156f67497917990a21070072e8bf6 (patch)
treea7fe5299fec74ace3c19e8abada96a3a1bcb8acc /src/lib
parent9a664f7b3b6a5315983317b0e47128b809bc5531 (diff)
downloadnoscript-e6af4b07c12156f67497917990a21070072e8bf6.tar.gz
noscript-e6af4b07c12156f67497917990a21070072e8bf6.tar.xz
noscript-e6af4b07c12156f67497917990a21070072e8bf6.zip
Minor adjustments for Firefox Preview (Fenix) compatibility.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/UA.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/UA.js b/src/lib/UA.js
index f679f95..57e98ae 100644
--- a/src/lib/UA.js
+++ b/src/lib/UA.js
@@ -1,10 +1,12 @@
{
let mozWebExtUrl = document.URL.startsWith("moz-");
let isMozilla = mozWebExtUrl || typeof window.wrappedJSObject === "object";
+ let mobile = false;
if (isMozilla) {
if (mozWebExtUrl) {
// help browser-specific UI styling
document.documentElement.classList.add("mozwebext");
+ mobile = !("windows" in browser);
}
} else {
// shims for non-Mozilla browsers
@@ -14,6 +16,7 @@
}
var UA = {
- isMozilla
+ isMozilla,
+ mobile,
};
}