}
my $name = 'unknown';
- if ($browser =~ /Lynx/i) { $name = 'Lynx'; }
+ if ($browser =~ /Mozilla/i)
+ {
+ if ($browser =~ m/Firefox|Iceweasel|Minefield|BonEcho/i) { $name = 'Firefox'; }
+ elsif ($browser =~ m/SeaMonkey/i) { $name = 'SeaMonkey'; }
+ elsif ($browser =~ m/Konqueror/i) { $name = 'Konqueror'; }
+ elsif ($browser =~ m/Safari/i) { $name = 'Safari'; }
+ elsif ($browser =~ m/MSIE/i) { $name = 'MSIE'; }
+ elsif ($browser =~ m/Epiphany/i) { $name = 'Epiphany'; }
+ elsif ($browser =~ m/compatible/i) { $name = 'Netscape compatible'; }
+ elsif ($browser =~ m!Mozilla/[0-4]!i or $browser =~ m/Netscape/i) { $name = 'Netscape Navigator'; }
+ else
+ {
+ $name = 'Mozilla';
+ }
+ }
+ elsif ($browser =~ /Lynx/i) { $name = 'Lynx'; }
elsif ($browser =~ /Links/i) { $name = 'Links'; }
elsif ($browser =~ /Opera/i) { $name = 'Opera'; }
elsif ($browser =~ /WebTV/i) { $name = 'WebTV'; }
elsif ($browser =~ /wget/i) { $name = 'wget'; }
elsif ($browser =~ /GetRight|GoZilla/i) { $name = 'Download Manager'; }
elsif ($browser =~ /bot|Google|Slurp|Scooter|Spider|Infoseek|Crawl|Mercator|FireBall|av\.com|Teoma|Ask Jeeves/i) { $name = 'Search Engines'; }
- elsif ($browser =~ /Mozilla/i)
- {
- if ($browser =~ /Galeon/i) { $name = 'Galeon'; }
- elsif ($browser =~ /Phoenix/i) { $name = 'Phoenix'; }
- elsif ($browser =~ /Chimera|Camino/i) { $name = 'Camino'; }
- elsif ($browser =~ /Konqueror/i) { $name = 'Konqueror'; }
- elsif ($browser =~ /Safari/i) { $name = 'Safari'; }
- elsif ($browser =~ /MultiZilla/i) { $name = 'MultiZilla'; }
- elsif ($browser =~ /MSIE/i) { $name = 'MSIE'; }
- elsif ($browser =~ /compatible/i) { $name = 'Netscape compatible'; }
- elsif ($browser =~ m!Mozilla/[0-4]!i or $browser =~ m/Netscape/i)
- { $name = 'Netscape Navigator'; }
- else { $name = 'Mozilla'; }
- }
elsif ($::DEBUG & 0x2000)
{
print $/, __FILE__, ": Unknown browser: '$browser'";
$recognized_browsers{$browser} = $name;
return ($name);
-}
+} # detect_browser
sub detect_os
# uses the same string "detect_browser" does,