Commit dd927687 authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Bug 21091: Hide the "Check for Tor Browser Update..." menu entry when running under the sandbox.

If the `TOR_HIDE_UPDATE_CHECK_UI` env var is set, hide the "Check for
Tor Browser Update..." menu item and the separator that sits right above it.
parent 96139918
......@@ -44,7 +44,7 @@
<menuseparator id="torbutton-checkForUpdateSeparator"/>
<menuitem id="torbutton-checkForUpdate"
......@@ -1822,6 +1822,17 @@ function torbutton_check_protections()
document.getElementById("torbutton-networksettings").hidden = false;
// Bug 21091: check for the existence of an environment variable
// in order to toggle the visibility of the torbutton-checkForUpdate
// menuitem and its separator.
if (env.exists("TOR_HIDE_UPDATE_CHECK_UI")) {
document.getElementById("torbutton-checkForUpdateSeparator").hidden = true;
document.getElementById("torbutton-checkForUpdate").hidden = true;
} else {
document.getElementById("torbutton-checkForUpdateSeparator").hidden = false;
document.getElementById("torbutton-checkForUpdate").hidden = false;
var cookie_pref = m_tb_prefs.getBoolPref("extensions.torbutton.cookie_protections");
document.getElementById("torbutton-cookie-protector").disabled = !cookie_pref;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment