[Companion] New test version

Brian Kennelly mozdev at bkennelly.net
Tue Dec 7 10:02:44 EST 2004


Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: yahootb1207.xpi
Type: application/x-xpinstall
Size: 53366 bytes
Desc: not available
Url : http://mozdev.org/pipermail/companion/attachments/20041207/59363b11/yahootb1207-0001.bin
-------------- next part --------------
Index: sources/dyn/install.js
===================================================================
RCS file: /cvs/companion/sources/dyn/install.js,v
retrieving revision 1.14
diff -b -B -u -r1.14 install.js
--- sources/dyn/install.js	28 Oct 2004 02:41:38 -0000	1.14
+++ sources/dyn/install.js	7 Dec 2004 16:47:59 -0000
@@ -4,7 +4,7 @@
 // User defined constants
   const myProductName = "yahootoolbar"; //same as the package name in contents.rdf
   const myProductRegKey = "/mozilla/yahootoolbar";
-  const myProductRegVersion = "0.5.5.20041027";
+  const myProductRegVersion = "0.5.5.20041207";
   const myJarFileName = "yahootoolbar.jar";
   
 // Installation Script
Index: sources/dyn/install.rdf
===================================================================
RCS file: /cvs/companion/sources/dyn/install.rdf,v
retrieving revision 1.13
diff -b -B -u -r1.13 install.rdf
--- sources/dyn/install.rdf	28 Oct 2004 02:41:38 -0000	1.13
+++ sources/dyn/install.rdf	7 Dec 2004 16:47:59 -0000
@@ -25,7 +25,7 @@
         
         but we should consider adding a build value as well.
    -->
-   <em:version>0.5.5.20041027</em:version>
+   <em:version>0.5.5.20041207</em:version>
    
    <!-- the workers -->
    <em:creator>Peter Burgner</em:creator>
Index: sources/dyn/content/class_Button.js
===================================================================
RCS file: /cvs/companion/sources/dyn/content/class_Button.js,v
retrieving revision 1.8
diff -b -B -u -r1.8 class_Button.js
--- sources/dyn/content/class_Button.js	8 Oct 2004 17:06:57 -0000	1.8
+++ sources/dyn/content/class_Button.js	7 Dec 2004 16:47:59 -0000
@@ -105,6 +105,8 @@
     link = buffer.substr(offset,(end - offset))
     if(link.substr(0,1) == "%")
         link = link.substr(1);
+    // Now adjust for a leading $ESRV
+    link = link.replace(/^\$ESRV\x01%/,"http://edit.companion.yahoo.com");
     return link;
 }
 
Index: sources/dyn/content/class_CompanionDisplayer.js
===================================================================
RCS file: /cvs/companion/sources/dyn/content/class_CompanionDisplayer.js,v
retrieving revision 1.15
diff -b -B -u -r1.15 class_CompanionDisplayer.js
--- sources/dyn/content/class_CompanionDisplayer.js	28 Oct 2004 02:41:38 -0000	1.15
+++ sources/dyn/content/class_CompanionDisplayer.js	7 Dec 2004 16:48:00 -0000
@@ -304,7 +304,7 @@
             
             // what we actually need here is to make a background request
             var js = "var d = window._content.document; ";
-            js += "var url2='"+url+"&.name='+escape(d.title)+'&.url='+escape(d.location);";
+            js += "var url2='"+url+"&.name='+escape(d.title)+'&.url='+encodeURIComponent(d.location);";
             //js += "alert('URL to add is: ' + url2);"
             js += " var obj = new XMLHttpRequest();" ;
             js += " obj.open('GET',url2);" ;
Index: sources/dyn/content/class_Menu.js
===================================================================
RCS file: /cvs/companion/sources/dyn/content/class_Menu.js,v
retrieving revision 1.12
diff -b -B -u -r1.12 class_Menu.js
--- sources/dyn/content/class_Menu.js	19 Oct 2004 15:09:11 -0000	1.12
+++ sources/dyn/content/class_Menu.js	7 Dec 2004 16:48:00 -0000
@@ -75,6 +75,12 @@
           //);
     this.parseLineItems(menuLineItems);
     this.determineImage();
+    // Temporary patch for new alert icon
+    if (this.img == "mno2.bmp") 
+	{
+		this.type = "alert";
+		this.img  = "alert";     // use old icon
+	}
 }
 
 Menu.prototype.determineImage = function()
Index: sources/dyn/content/yahootoolbarOverlay.js
===================================================================
RCS file: /cvs/companion/sources/dyn/content/yahootoolbarOverlay.js,v
retrieving revision 1.20
diff -b -B -u -r1.20 yahootoolbarOverlay.js
--- sources/dyn/content/yahootoolbarOverlay.js	28 Oct 2004 02:41:38 -0000	1.20
+++ sources/dyn/content/yahootoolbarOverlay.js	7 Dec 2004 16:48:00 -0000
@@ -28,7 +28,7 @@
         // The search string is the value of the p= parameter in the URL
         // Look for the 'p=' following a '&' or the initial '?'
         var tmp = d.location.search.match(/[&|^?]p=([^&]*)/);
-        yahootoolbar.AddSearchTerm(unescape(tmp[1]), "yahootoolbarSearchTextDyn");
+        yahootoolbar.AddSearchTerm(decodeURIComponent(tmp[1]), "yahootoolbarSearchTextDyn");
     }
 }
 
@@ -121,9 +121,9 @@
     var searchUrl = url.replace(re, mySearchTerm);
     var d = window._content.document;
     re    = /\x01\$GETTITLE/g;
-    searchUrl = searchUrl.replace(re,escape(d.title));
+    searchUrl = searchUrl.replace(re,encodeURIComponent(d.title));
     re    = /\x01\$GETURL/g;
-    searchUrl = searchUrl.replace(re,escape(d.location));
+    searchUrl = searchUrl.replace(re,encodeURIComponent(d.location));
     re    = /\x01\$ESRV/g;
     searchUrl = searchUrl.replace(re,"edit.companion.yahoo.com");
 
@@ -301,13 +301,13 @@
     var mySearchBox = document.getElementById('yahootoolbarSearchTextDyn');
   
     // extract its value
-    var mySearchTerm = mySearchBox.value;
+    var mySearchTerm = encodeURIComponent(mySearchBox.value);
     
     //yahootoolbar.AddSearchTerm(mySearchTerm, "yahootoolbarSearchTextDyn");
     
     if(url == null)
     {
-        url = "http://search.yahoo.com/bin/search?fr=slv1-\x01$REG_sc&p=\x01EditBox";
+        url = "http://search.yahoo.com/bin/search?ei=UTF-8&fr=slv1-\x01$REG_sc&p=\x01EditBox";
     }
     // now change \x01EditBox to the search text
 


More information about the Companion mailing list