[tbb-commits] [torbutton/master] Bug 27276: Adapt to new NoScript messaging protocol
gk at torproject.org
gk at torproject.org
Thu Aug 23 06:22:55 UTC 2018
commit aa379dcc5c06ee542a1c63adc769678700e32eaa
Author: Arthur Edelstein <arthuredelstein at gmail.com>
Date: Wed Aug 22 17:06:44 2018 -0700
Bug 27276: Adapt to new NoScript messaging protocol
Also, fix a bug in noscript-control.js where initialized
was never set to true.
---
src/modules/noscript-control.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/modules/noscript-control.js b/src/modules/noscript-control.js
index 6270efe5..196d14c2 100644
--- a/src/modules/noscript-control.js
+++ b/src/modules/noscript-control.js
@@ -48,7 +48,8 @@ const default_caps = [
// capabilities. Most things are blocked.
let noscriptSettings = safetyLevel => (
{
- "type": "NoScript.updateSettings",
+ "type": "NoScript.updateSettings", // backwards compatibility
+ "_messageName": "updateSettings",
"policy": {
"DEFAULT": {
"capabilities": default_caps[safetyLevel],
@@ -117,6 +118,7 @@ var initialize = () => {
if (initialized) {
return;
}
+ initialized = true;
bindPrefAndInit(
"extensions.torbutton.security_slider",
sliderState => setNoScriptSafetyLevel(securitySliderToSafetyLevel(sliderState)));
More information about the tbb-commits
mailing list