Commit 7a0efdf6 authored by Arthur Edelstein's avatar Arthur Edelstein Committed by Georg Koppen
Browse files

Bug 18093: Remove 'Restore Defaults' button

parent 52fbcbfa
......@@ -54,63 +54,6 @@ function torbutton_prefs_save(doc) {
function torbutton_prefs_reset_defaults() {
var o_torprefs = torbutton_get_prefbranch('extensions.torbutton.');
var tmpcnt = new Object();
var children;
var i;
var loglevel = o_torprefs.getIntPref("loglevel");
var logmthd = o_torprefs.getIntPref("logmethod");
torbutton_log(3, "Starting Pref reset");
// 1. Clear torbutton settings
// 2. Clear browser proxy settings
// 3. Reset Security Slider settings
// XXX Warning: The only reason this works is because of Firefox's
// threading model. As soon as a pref is changed, all observers
// are notified by that same thread, immediately. Since torbutton's
// security state is driven by proxy pref observers, this
// causes everything to be reset in a linear order. If firefox
// ever makes pref observers asynchonous, this will all break.
children = o_torprefs.getChildList("" , tmpcnt);
for(i = 0; i < children.length; i++) {
// Keep logging the same.
o_torprefs.setIntPref("loglevel", loglevel);
o_torprefs.setIntPref("logmethod", logmthd);
torbutton_log(3, "Resetting browser prefs");
// Reset browser prefs that torbutton touches just in case
// they get horked. Better everything gets set back to default
// than some arcane pref gets wedged with no clear way to fix it.
// Technical users who tuned these by themselves will be able to fix it.
// It's the non-technical ones we should make it easy for
// Resetting the Security Slider preferences
var wm = Components.classes[";1"]
var win = wm.getMostRecentWindow("navigator:browser");
o_torprefs.setBoolPref('security_custom', false);
o_torprefs.setIntPref('security_slider', 4);
torbutton_log(4, "Preferences reset to defaults");
// In all cases, force prefs to be synced to disk
var prefService = Components.classes[";1"]
function torbutton_toggle_slider(doc, pos) {
doc.getElementById("torbutton_sec_slider").value = pos;
// Make sure the custom checkbox is unchecked as the user seems to want one
......@@ -8,9 +8,7 @@
persist="screenX screenY width height"
......@@ -52,30 +52,6 @@ function torbutton_get_prefbranch(branch_name) {
return o_branch;
// Bug 1506 P3: This would be a semi-polite thing to do on uninstall
// for pure Firefox users. The most polite thing would be to save
// all their original prefs.. But meh?
function torbutton_reset_browser_prefs() {
var o_all_prefs = torbutton_get_prefbranch('');
var prefs = ["network.http.sendSecureXSiteReferrer",
"network.http.sendRefererHeader", "",
"extensions.update.enabled", "app.update.enabled",
"", "",
"browser.cache.memory.enable", "network.http.use-cache",
"browser.cache.disk.enable", "browser.safebrowsing.enabled",
"browser.send_pings", "browser.safebrowsing.remoteLookups",
"", "",
"security.enable_java", "browser.history_expire_days",
"", "browser.formfill.enable",
"signon.rememberSignons", "plugin.disable_full_page_plugin_for_types",
"network.cookie.lifetimePolicy" ];
for(var i = 0; i < prefs.length; i++) {
// load localization strings
function torbutton_get_stringbundle()
......@@ -12,7 +12,6 @@
<!ENTITY torbutton.context_menu.cookieProtections.key "C">
<!ENTITY torbutton.button.tooltip "Click to initialize Torbutton">
<!ENTITY torbutton.prefs.security_settings "Security Settings">
<!ENTITY torbutton.prefs.restore_defaults "Restore Defaults">
<!ENTITY torbutton.cookiedialog.title "Manage Cookie Protections">
<!ENTITY torbutton.cookiedialog.lockCol "Protected">
<!ENTITY torbutton.cookiedialog.domainCol "Host">
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