From e6af4b07c12156f67497917990a21070072e8bf6 Mon Sep 17 00:00:00 2001 From: hackademix Date: Sat, 29 Feb 2020 19:03:39 +0100 Subject: Minor adjustments for Firefox Preview (Fenix) compatibility. --- src/ui/options.css | 1 + src/ui/popup.js | 6 +++++- src/ui/ui.css | 10 ++++------ src/ui/ui.js | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src/ui') 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"); -- cgit v1.2.3