Nintendo DSi Browser: Difference between revisions

From DSiBrew
Jump to navigation Jump to search
CashMan (talk | contribs)
No edit summary
CashMan (talk | contribs)
No edit summary
Line 11: Line 11:
== Tips ==
== Tips ==


* To active the vertical mode automatically, add this tag between <head></head> :
=== Vertical mode ===
 
To active the vertical mode automatically, add this tag between <head></head> :


  <meta name="viewport" content="width=240">
  <meta name="viewport" content="width=240">
Line 17: Line 19:
You can test that with a demo page on my website : [http://www.cashman-productions.fr.nf/dsi/ here]
You can test that with a demo page on my website : [http://www.cashman-productions.fr.nf/dsi/ here]


* To detect if the user agent is Nintendo DSi Browser :
=== Detect User Agent ===
 
To detect if the user agent is Nintendo DSi Browser :


  <script type="text/javascript">
  <script type="text/javascript">

Revision as of 20:22, 9 April 2009

Browse the web with the second edition of the Opera browser for DS. (Flash and things not supported)

User Agent strings

Sample DSi Browser User Agent Strings :

  • Opera/9.50 (Nintendo DSi; Opera/483; U; en-US)
  • Opera/9.50 (Nintendo DSi; Opera/483; U; en-GB)

Tips

Vertical mode

To active the vertical mode automatically, add this tag between <head></head> :

<meta name="viewport" content="width=240">

You can test that with a demo page on my website : here

Detect User Agent

To detect if the user agent is Nintendo DSi Browser :

<script type="text/javascript">
     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>