summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2019-07-14 15:01:52 +0200
committersegfault <segfault@riseup.net>2019-07-14 16:44:48 +0200
commit910d3b342536047ca404abea36e89585a4b97609 (patch)
tree6a06bbd024a7600504b3824d497174bf5590df3e
parent23863ff20b36b0c37e5c6e589502ff62a84e6c73 (diff)
Hide the security level button in the unsafe browser (refs: #16735)bugfix/16735-hide-security-level-button-in-unsafe-browser
-rwxr-xr-xconfig/chroot_local-hooks/10-tbb7
1 files changed, 7 insertions, 0 deletions
diff --git a/config/chroot_local-hooks/10-tbb b/config/chroot_local-hooks/10-tbb
index ce4a5a7..9adc98a 100755
--- a/config/chroot_local-hooks/10-tbb
+++ b/config/chroot_local-hooks/10-tbb
@@ -217,6 +217,13 @@ apply_prefs_hacks() {
perl -pi -E \
's/^(pref\("browser.uiCustomization.state",.*\\"loop-button\\")/$1,\\"stop-reload-button\\"/' \
defaults/preferences/000-tor-browser.js
+
+ # Hide the security level button in the unsafe browser (#16735)
+ UNSAFE_BROWSER_PREFS=/usr/share/tails/chroot-browsers/unsafe-browser/prefs.js
+ echo "\n// Hide the security level button" >> "${UNSAFE_BROWSER_PREFS}"
+ grep -E '^pref\("browser.uiCustomization.state"' defaults/preferences/000-tor-browser.js | \
+ perl -p -E 's/(.*)\\"security-level-button\\",/user_$1/' >> "${UNSAFE_BROWSER_PREFS}"
+
# Append our custom prefs
cat /usr/share/tails/tor-browser-prefs.js \
>> defaults/preferences/000-tor-browser.js