Den kod jag anvende fran Macromedia for Flash detection suger for den visade ingen Flash for Mac'ar.
Jag testade ett annat skript (se nedan) men, om en IE5 person (med Flash 3 player) kommer till sidan sa laddas inte Flash 4 filerna.
Ar det non som har ett "skit bra" Flash detection script?
Den kod jag anvender nu:
<script language="Javascript">
<!--
//********Set the names of your web pages here:*****
macie = "flash/index.html"
flash = "flash/index.html"
noflash = "index_nonflash.html"
//**************************************************
if (
navigator.appName == "Microsoft Internet Explorer" // if Explorer
&&
navigator.appVersion.indexOf("Mac") != -1 // if Mac
)
{
window.location=macie; // redirect page is for macies
}
var plugin = (
navigator.mimeTypes
&&
navigator.mimeTypes["application/x-shockwave-flash"]
?
navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0
);
if (
(
navigator.appName == "Microsoft Internet Explorer"
&&
navigator.appVersion.indexOf("Mac") == -1
&&
navigator.appVersion.indexOf("3.1") == -1
)
| |
(
plugin
&&
parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=4
)
)
{
window.location=flash;
}
else
{
window.location=noflash;
}
// -->
</script>
------------------
¬ peterbe.com¬