commit 8bc9aef5b873eecdae32a34f69170006c31eeddc Author: Georg Koppen gk@torproject.org Date: Thu Jan 26 15:49:11 2017 +0000
Bug 21324: Don't update NoScript button with timer update --- src/chrome/content/torbutton.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index 62b9371..990a990 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -140,9 +140,13 @@ var torbutton_unique_pref_observer = } return; } - + if (topic != "nsPref:changed") return; - if (data.startsWith("noscript.")) { + // Make sure the NoScript button shows the current NoScript state. We + // don't want to run the update function, though, if just a timer gets + // updated. Fixes bug 21324. + if (data.startsWith("noscript.") && + data !== "noscript.subscription.lastCheck") { torbutton_update_noscript_button(); } switch (data) {
tbb-commits@lists.torproject.org