Commit aa05941e authored by Arthur Edelstein's avatar Arthur Edelstein
Browse files

Bug 20244.2: Remove 'disable browser plugins' checkbox

This patch also removes the 'extensions.torbutton.no_tor_plugin'
pref and simply uses the 'plugin.disable' pref instead.

Thanks to our patch for Bug 10280 in tor-browser.git,
buttons on the plugins section of about:addons
already let you "Enable plugins" and "Disable plugins"
(i.e., toggle the 'plugin.disable' pref).

Also it's probably better to remove this footgun in the UI.
parent 6d785fa1
......@@ -14,7 +14,6 @@ function torbutton_prefs_init(doc) {
// Privacy and security settings
doc.getElementById('torbutton_resistFingerprinting').checked = o_torprefs.getBoolPref('resist_fingerprinting');
doc.getElementById('torbutton_blockPlugins').checked = o_torprefs.getBoolPref('no_tor_plugins');
doc.getElementById('torbutton_restrictThirdParty').checked = o_torprefs.getBoolPref('restrict_thirdparty');
let sec_slider = doc.getElementById('torbutton_sec_slider');
let sec_custom = doc.getElementById('torbutton_sec_custom');
......@@ -47,7 +46,6 @@ function torbutton_prefs_save(doc) {
// Privacy and Security Settings
o_torprefs.setBoolPref('resist_fingerprinting', doc.getElementById('torbutton_resistFingerprinting').checked);
o_torprefs.setBoolPref('no_tor_plugins', doc.getElementById('torbutton_blockPlugins').checked);
o_torprefs.setBoolPref('restrict_thirdparty', doc.getElementById('torbutton_restrictThirdParty').checked);
o_torprefs.setBoolPref('security_custom',
doc.getElementById('torbutton_sec_custom').checked);
......
......@@ -23,9 +23,6 @@
<groupbox>
<caption label="&torbutton.prefs.priv_caption;"
tooltiptext="&torbutton.prefs.priv_caption_tooltip;"/>
<checkbox id="torbutton_blockPlugins"
label="&torbutton.prefs.block_plugins;"
tooltiptext="&torbutton.prefs.block_plugins_tooltip;"/>
<checkbox id="torbutton_restrictThirdParty"
label="&torbutton.prefs.restrict_thirdparty;"
tooltiptext="&torbutton.prefs.restrict_thirdparty_tooltip;"/>
......
......@@ -95,6 +95,7 @@ var torbutton_unique_pref_observer =
this._branch.addObserver("media", this, false);
this._branch.addObserver("mathml", this, false);
this._branch.addObserver("svg", this, false);
this._branch.addObserver("plugin.disable", this, false);
// We observe xpcom-category-entry-added for plugins w/ Gecko-Content-Viewers
var observerService = Cc["@mozilla.org/observer-service;1"].
......@@ -162,9 +163,9 @@ var torbutton_unique_pref_observer =
m_tb_prefs.setBoolPref("extensions.torbutton.restrict_thirdparty", true);
break;
case "extensions.torbutton.no_tor_plugins":
case "plugin.disable":
torbutton_toggle_plugins(
m_tb_prefs.getBoolPref("extensions.torbutton.no_tor_plugins"));
m_tb_prefs.getBoolPref("plugin.disable"));
break;
case "browser.privatebrowsing.autostart":
torbutton_update_disk_prefs();
......@@ -516,11 +517,11 @@ function torbutton_confirm_plugins() {
m_tb_prefs.setBoolPref("extensions.torbutton.confirm_plugins", !askAgain.value);
// The pref observer for no_tor_plugins will set the appropriate plugin state.
// The pref observer for "plugin.disable" will set the appropriate plugin state.
// So, we only touch the pref if it has changed.
if (no_plugins !=
m_tb_prefs.getBoolPref("extensions.torbutton.no_tor_plugins"))
m_tb_prefs.setBoolPref("extensions.torbutton.no_tor_plugins", no_plugins);
m_tb_prefs.getBoolPref("plugin.disable"))
m_tb_prefs.setBoolPref("plugin.disable", no_plugins);
else
torbutton_toggle_plugins(no_plugins);
......@@ -1697,8 +1698,6 @@ function torbutton_tor_check_ok()
// toggles plugins: true for disabled, false for enabled
function torbutton_toggle_plugins(disable_plugins) {
if (m_tb_tbb) {
m_tb_prefs.setBoolPref("plugin.disable", disable_plugins);
var PH=Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
var P=PH.getPluginTags({});
for(var i=0; i<P.length; i++) {
......@@ -2321,7 +2320,7 @@ function torbutton_do_startup()
if(m_tb_prefs.getBoolPref("extensions.torbutton.startup")) {
// Bug 1506: Still want to do this
torbutton_toggle_plugins(
m_tb_prefs.getBoolPref("extensions.torbutton.no_tor_plugins"));
m_tb_prefs.getBoolPref("plugin.disable"));
// Bug 1506: Should probably be moved to an XPCOM component
torbutton_do_main_window_startup();
......
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -26,7 +26,6 @@
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "لا تحم ملفات تعريف الارتباط الجديدة">
<!ENTITY torbutton.prefs.priv_caption "إعدادات الخصوصية">
<!ENTITY torbutton.prefs.restrict_thirdparty "تقييد الـCookies الخاصة بالطرف الثالث و بيانات التتبع الأخري.">
<!ENTITY torbutton.prefs.block_plugins "تعطيل إضافات المتصفح (مثل فلاش)">
<!ENTITY torbutton.prefs.resist_fingerprinting "تغيير التفاصيل التي تميزك عن المستخدمين الآخرين لمتصفح تور">
<!ENTITY torbutton.prefs.sec_caption "مستوى الأمان">
<!ENTITY torbutton.prefs.sec_low "منخفض (افتراضي)">
......
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
......@@ -22,5 +22,4 @@
<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
<!ENTITY torbutton.prefs.block_plugins "Disable browser plugins (such as Flash)">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
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