[Project_owners] Sniffer for Firefox vs. Mozilla

Eelco van Kuik moz-needlesearch at planet.nl
Tue Jul 20 12:32:24 EDT 2004


Hi,
 
I wrote a simple sniffer to find out if the script is run in Firefox 0.9 or
above and Firefox 0.8 or Mozilla 1.x. Here it is:
 
if (navigator.appCodeName == 'Mozilla' && 

    navigator.userAgent.indexOf('Firefox/') >= 0 &&

    navigator.userAgent.indexOf('/0.8') < 0 ) {

isFirefox = true

} else {

isFirefox = false

}

Is there a better way of doing this? Some XPCOM object, etc.?
 
TIA!
 
Regards,
 
Eelco van Kuik
 
 
 
  _____  

 
Eelco van Kuik

M: 06 - 410 49 269
E:  <mailto:ej.van.kuik at arroba.nl> ej.van.kuik at arroba.nl
 
 
Arroba
Bankastraat 30-2
1094 EE Amsterdam
E:  <mailto:info at arroba.nl> info at arroba.nl

W:  <http://www.arroba.nl/> www.arroba.nl
K.v.k. Amsterdam: 341.888.78
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20040720/48dddab4/attachment.htm


More information about the Project_owners mailing list