Nintendo DSi Browser: Difference between revisions
Nickeilitz (talk | contribs) |
m Undo revision 4196 by Nickeilitz (talk) Vandalism? |
||
| Line 84: | Line 84: | ||
=== Detect User Agent === | === Detect User Agent === | ||
To detect if the user agent is Nintendo DSi Browser : | To detect if the user agent is Nintendo DSi Browser : | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
window.onload=function | window.onload=function() | ||
{ | |||
if (navigator.userAgent.indexOf('Nintendo DSi') == -1) //If the UserAgent is not "Nintendo DSi" | |||
{ | |||
location.replace('http://www.dsibrew.org'); //Redirect to an other page | |||
} | |||
} | |||
</script> | |||
=== Key Codes === | === Key Codes === | ||