Hi,
Cannot one just detect the browser type with a global? as in:
<%browser%>
sub {
my $tags = shift;
my $browser = ($ENV{'HTTP_USER_AGENT'});
if ($browser =~ /MSIE/) {
return "Internet Explorer";
}
if ($browser =~ /Mozilla/) {
return "Netscape";
}
return $browser;
}
It avoids modifying your gossamer code and it works for me! It's expandable to cope with other browser and to set type size parameters. Do you see any problem?
Cannot one just detect the browser type with a global? as in:
<%browser%>
sub {
my $tags = shift;
my $browser = ($ENV{'HTTP_USER_AGENT'});
if ($browser =~ /MSIE/) {
return "Internet Explorer";
}
if ($browser =~ /Mozilla/) {
return "Netscape";
}
return $browser;
}
It avoids modifying your gossamer code and it works for me! It's expandable to cope with other browser and to set type size parameters. Do you see any problem?