From d1dd278a81444e2203945fc213a4b69ed1ee49a7 Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 14 Mar 2019 01:57:58 +0100 Subject: Selective handling of Tor Browser options and work-around for https://bugzilla.mozilla.org/show_bug.cgi?id=1532530 --- src/ui/options.css | 10 ++++++++++ src/ui/options.html | 22 +++++++++++++++++++--- src/ui/options.js | 9 +++++++-- src/ui/ui.js | 3 +++ 4 files changed, 39 insertions(+), 5 deletions(-) (limited to 'src/ui') diff --git a/src/ui/options.css b/src/ui/options.css index f7db24b..6e6eec7 100644 --- a/src/ui/options.css +++ b/src/ui/options.css @@ -136,9 +136,19 @@ input[type="file"] { .opt-group { padding: 0.5em 0; } + #xssFaq { padding: 0.5em 1em; } + +#tb-options { + display: none; +} + +.tor #tb-options { + display: initial; +} + #clearclick-options { display: none; } diff --git a/src/ui/options.html b/src/ui/options.html index 6e2ad0e..a80dece 100644 --- a/src/ui/options.html +++ b/src/ui/options.html @@ -99,17 +99,33 @@

-
- +
+ - (__MSG_XssFaq__) + (__MSG_XssFaq__) +
+ + + + + + + +
+
+ + + + +
+
diff --git a/src/ui/options.js b/src/ui/options.js index 31cf5c3..7a9ca2b 100644 --- a/src/ui/options.js +++ b/src/ui/options.js @@ -8,9 +8,9 @@ let version = browser.runtime.getManifest().version; document.querySelector("#version").textContent = _("Version", version); // simple general options - + let opt = UI.wireOption; - + opt("global", o => { if (o) { policy.enforced = !o.checked; @@ -33,6 +33,11 @@ }); opt("xss"); + opt("xssScanRequestBody"); + opt("xssBlockUnscannedPOST"); + + opt("overrideTorBrowserPolicy"); + { let button = document.querySelector("#btn-reset"); button.onclick = async () => { diff --git a/src/ui/ui.js b/src/ui/ui.js index 205d2a9..46d9d7f 100644 --- a/src/ui/ui.js +++ b/src/ui/ui.js @@ -41,6 +41,9 @@ var UI = (() => { if (UI.local && !UI.local.debug) { debug = () => {}; // be quiet! } + if (UI.local) { + document.documentElement.classList.toggle("tor", !!UI.local.isTorBrowser); + } resolve(); if (UI.onSettings) UI.onSettings(); await HighContrast.init(); -- cgit v1.2.3