[or-cvs] r18708: {torbutton} Fix noscript conflict from bug 773. (torbutton/trunk/src/chrome/content)

mikeperry at seul.org mikeperry at seul.org
Fri Feb 27 11:51:32 UTC 2009


Author: mikeperry
Date: 2009-02-27 06:51:32 -0500 (Fri, 27 Feb 2009)
New Revision: 18708

Modified:
   torbutton/trunk/src/chrome/content/torbutton.js
Log:

Fix noscript conflict from bug 773.



Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js	2009-02-27 08:26:37 UTC (rev 18707)
+++ torbutton/trunk/src/chrome/content/torbutton.js	2009-02-27 11:51:32 UTC (rev 18708)
@@ -2471,8 +2471,12 @@
 
         browser.__tb_tor_fetched = !tor_tag;
         browser.docShell.allowPlugins = tor_tag || !kill_plugins;
-        if(browser.docShell.allowJavascript != js_enabled) {
-            torbutton_log(3, "Javascript changed to: "+js_enabled);
+        if(js_enabled && !browser.docShell.allowJavascript) {
+            // Only care about re-enabling javascript. 
+            // The js engine obeys the pref over the docshell attribute
+            // for disabling js, and this is the source of a conflict with
+            // NoScript
+            torbutton_log(3, "Javascript changed from "+browser.docShell.allowJavascript+" to: "+js_enabled);
             browser.docShell.allowJavascript = js_enabled;
             torbutton_check_round(browser);
             // JS was not fully enabled for some page elements. 



More information about the tor-commits mailing list