Nintendo DSi Browser: Difference between revisions

m spam
m Socialcu.be does not have https
 
(11 intermediate revisions by 4 users not shown)
Line 80: Line 80:
To active the vertical mode automatically, add one of the following tags between <head></head> :
To active the vertical mode automatically, add one of the following tags between <head></head> :


  <meta name="viewport" content="width=device-width" />
  <meta name="viewport" content="width=device-width">
  <meta name="viewport" content="width=240" />
  <meta name="viewport" content="width=240">


Using device-width will adapt the page to the width of other mobile devices.
Using device-width will adapt the page to the width of other mobile devices.


You can test this mode with the following demo page: [http://www.cashman-productions.fr.nf/dsi/ here] (link dead as of 06/2010)
You can test this mode with the following demo page: [http://dsipaint.com DSiPaint].


=== 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 ===
Line 159: Line 150:
== Example Sites ==
== Example Sites ==
<!-- If you have a website that demonstrates these techniques, place it here! -->
<!-- If you have a website that demonstrates these techniques, place it here! -->
* [http://dsipaint.com DSiPaint]
* [http://socialcu.be SocialCu.be]
* [http://www.dsicade.com DSiCade]
* [http://www.dsicade.com DSiCade]
* [http://dsipaint.com DSiPaint]
* [http://hullbreachonline.com/ds HullBreach Online Lite]
* [http://hullbreachonline.com/ds HullBreach Online Lite]