[or-cvs] r14359: Fix bug 644. Also fix issue with Date object instances not b (torbutton/trunk/src/chrome/content)

mikeperry at seul.org mikeperry at seul.org
Sat Apr 12 05:25:24 UTC 2008


Author: mikeperry
Date: 2008-04-12 01:25:23 -0400 (Sat, 12 Apr 2008)
New Revision: 14359

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

Fix bug 644. Also fix issue with Date object instances not
being properly comparible (broke yahoo mail account
creation).



Modified: torbutton/trunk/src/chrome/content/jshooks.js
===================================================================
--- torbutton/trunk/src/chrome/content/jshooks.js	2008-04-11 07:57:17 UTC (rev 14358)
+++ torbutton/trunk/src/chrome/content/jshooks.js	2008-04-12 05:25:23 UTC (rev 14359)
@@ -70,12 +70,13 @@
               var f;
               for(var i in window.navigator) {
                   tmpNav[i] = window.navigator[i];
+                  
                   // XPCNative objects are special for some reason. So far, 
                   // all we have are "plugins" and mimeTypes, which 
                   // are empty anyways. Disable them.
-                  //if(tmpNav[i].toString().indexOf("XPCNative") != -1) {
-                  if(i === "plugins" || i === "mimeTypes") {
-                      tmpNav[i] = new Array();
+                  if(tmpNav[i].toString().indexOf("XPCNative") != -1) {
+                      window.navigator[i] = tmpNav[i];
+                      continue;
                   }
                   f = function() { // crazy scope hack to preserve i
                       var holder = i;
@@ -193,7 +194,7 @@
       }
     }
 
-    window.Date.prototype.valueOf=function(){return d.toUTCString()};
+    window.Date.prototype.valueOf=function(){return d.getTime()};
     window.Date.prototype.getTime=function(){return d.getTime();} /* UTC already */ 
     window.Date.prototype.getFullYear=function(){return d.getUTCFullYear();}  
     window.Date.prototype.getYear=function() {return d.getYear();}

Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js	2008-04-11 07:57:17 UTC (rev 14358)
+++ torbutton/trunk/src/chrome/content/torbutton.js	2008-04-12 05:25:23 UTC (rev 14359)
@@ -960,7 +960,7 @@
             if(kill_plugins) 
                 b.docShell.allowPlugins = !b.__tb_tor_fetched && !tor_enabled;
             else 
-                browser.docShell.allowPlugins = true;
+                b.docShell.allowPlugins = true;
             
             if(isolate_dyn) {
                 torbutton_check_js_tag(b, tor_enabled, js_enabled);



More information about the tor-commits mailing list