Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
......@@ -44,7 +44,7 @@
label="&torbutton.context_menu.networksettings;"
accesskey="&torbutton.context_menu.networksettings.key;"
oncommand="torbutton_open_network_settings()"/>
<menuseparator/>
<menuseparator id="torbutton-checkForUpdateSeparator"/>
<menuitem id="torbutton-checkForUpdate"
label="&torbutton.context_menu.downloadUpdate;"
accesskey="&torbutton.context_menu.downloadUpdate.key;"
......
......
......@@ -1822,6 +1822,17 @@ function torbutton_check_protections()
else
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;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment