Dear Devs,
  Most of us Ubuntu users (jaunty & karmic) are using the firefox-3.5
(seems different from the more official one from gHardy) package from
universe, which didn't use the Firefox name due to trademark rights of
Mozilla. The default user agent string is thus set to "Shiretoko". I
noticed that detectBrowser() in 'jsutils.js' uses user agent string to
determine the browser in use. Wouldn't it nice to change line 136:

===BEGIN PATCH===
--- js_utils.js 2009-07-15 14:53:13.393284244 +0800
+++ new/js_utils.js     2009-07-15 14:54:26.643083739 +0800
@@ -133,7 +133,7 @@
     browser = "OperaMobile";
   } else if (navigator.userAgent.indexOf("Opera")!=-1) {
     browser = "Opera";
-  } else if (navigator.userAgent.indexOf("Firefox")!=-1) {
+  } else if (navigator.userAgent.indexOf("Firefox")!=-1 ||
navigator.userAgent.indexOf("Shiretoko")!=-1) {
     browser = "Firefox";
   } else if (navigator.userAgent.indexOf("MSIE")!=-1) {
     if (navigator.userAgent.indexOf("Windows CE")!=-1) {
====END PATCH====

this is just a quick dirty patch, we might factor that out to test a
sequence of code names if my proposal is taken at all

Cheers,
Jesse

Reply via email to