diff options
author | hackademix | 2020-02-29 19:03:39 +0100 |
---|---|---|
committer | hackademix | 2020-02-29 19:03:39 +0100 |
commit | e6af4b07c12156f67497917990a21070072e8bf6 (patch) | |
tree | a7fe5299fec74ace3c19e8abada96a3a1bcb8acc /src/ui | |
parent | 9a664f7b3b6a5315983317b0e47128b809bc5531 (diff) | |
download | noscript-e6af4b07c12156f67497917990a21070072e8bf6.tar.gz noscript-e6af4b07c12156f67497917990a21070072e8bf6.tar.xz noscript-e6af4b07c12156f67497917990a21070072e8bf6.zip |
Minor adjustments for Firefox Preview (Fenix) compatibility.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/options.css | 1 | ||||
-rw-r--r-- | src/ui/popup.js | 6 | ||||
-rw-r--r-- | src/ui/ui.css | 10 | ||||
-rw-r--r-- | src/ui/ui.js | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/src/ui/options.css b/src/ui/options.css index 652a9bf..4653786 100644 --- a/src/ui/options.css +++ b/src/ui/options.css @@ -42,6 +42,7 @@ body { justify-content: flex-end; width: 100%; text-align: right; + margin: 0 0 2px 0; } #sect-general { diff --git a/src/ui/popup.js b/src/ui/popup.js index 07c21e4..63f9eee 100644 --- a/src/ui/popup.js +++ b/src/ui/popup.js @@ -65,7 +65,11 @@ addEventListener("unload", e => { { let clickHandlers = { "options": e => { - browser.runtime.openOptionsPage(); + if (UA.mobile) { // Fenix fails on openOptionsPage + browser.tabs.create({url: browser.extension.getURL("/ui/options.html")}); + } else { + browser.runtime.openOptionsPage(); + } close(); }, "close": close, diff --git a/src/ui/ui.css b/src/ui/ui.css index 1d40030..437758d 100644 --- a/src/ui/ui.css +++ b/src/ui/ui.css @@ -410,15 +410,13 @@ fieldset { legend { font-weight: bold; - display: inline; - position: absolute; - top: 0.25em; - left: 1em; - white-space: nowrap; + display: block; } .customizer legend { - font-weight: bold; font-size: 0.75em; + position: absolute; + top: 0.25em; + left: 1em; } #presets .https-only { diff --git a/src/ui/ui.js b/src/ui/ui.js index dafba4f..f562edd 100644 --- a/src/ui/ui.js +++ b/src/ui/ui.js @@ -21,7 +21,7 @@ var UI = (() => { "/lib/tld.js", "/common/Policy.js", ]; - this.mobile = !("windows" in browser); + this.mobile = UA.mobile; if (this.mobile) { document.documentElement.classList.toggle("mobile", true); scripts.push("/lib/fastclick.js"); |