commit 7d130aafe1f7c25e737173282b57511b8e8eba08 Author: Mike Perry mikeperry-git@torproject.org Date: Wed Mar 25 10:52:24 2015 -0700
Bug 7255: Make maximize counter count down to 0. --- src/chrome/content/torbutton.js | 6 +++--- src/defaults/preferences/preferences.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index 77a388e..3158c04 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -3421,7 +3421,7 @@ var torbutton_resizelistener = m_tb_resize_handler = function() { if (window.windowState === 1) { if (m_tb_prefs. - getIntPref("extensions.torbutton.maximize_warning_counter") < 3) { + getIntPref("extensions.torbutton.maximize_warnings_remaining") > 0) {
// Rate-limit showing our notification if needed. if (m_tb_resize_date === null) { @@ -3452,8 +3452,8 @@ var torbutton_resizelistener = popup: null, callback: function() { - m_tb_prefs.setIntPref("extensions.torbutton.maximize_warning_counter", - m_tb_prefs.getIntPref("extensions.torbutton.maximize_warning_counter") + 1); + m_tb_prefs.setIntPref("extensions.torbutton.maximize_warnings_remaining", + m_tb_prefs.getIntPref("extensions.torbutton.maximize_warnings_remaining") - 1); } }];
diff --git a/src/defaults/preferences/preferences.js b/src/defaults/preferences/preferences.js index c85c7f4..2c109ee 100644 --- a/src/defaults/preferences/preferences.js +++ b/src/defaults/preferences/preferences.js @@ -118,7 +118,7 @@ pref("extensions.torbutton.prompted_language",false); // TODO: This is just part of a stopgap until #14429 gets properly implemented. // See #7255 for details. We display the warning three times to make sure the // user did not click on it by accident. -pref("extensions.torbutton.maximize_warning_counter", 0); +pref("extensions.torbutton.maximize_warnings_remaining", 3); pref("extensions.torbutton.startup_resize_period", true);
// Security prefs: