Re: Theme iphone | Titre du sujet : Re: Theme iphone par HerveK sur 28/11/2010 10:06:28
Salut et bon dimanche,
Si je comprends bien dans le theme. html pour pc , avec le script si le user agent est "mobile" tu le fais changer de theme ?
C'est ca ? J'ai bon ?
<SCRIPT language="Javascript">
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.hkrag.fr/index.php";
}
if((navigator.userAgent.match(/iPad/i)) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.hkrag.fr/index.php";
}
if((navigator.userAgent.match(/iPod/i)) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.hkrag.fr/index.php";
}
if((navigator.userAgent.match(/mobile/i)) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.hkrag.fr/index.php";
}
if((navigator.userAgent.match(/SAMSUNG/i)) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.hkrag.fr/index.php";
}
</SCRIPT>
|
|