HTML5 Portrait view...

When I write my games that need to work in either orientation I use a 'square' screen (I set the screen width the same as the height), I then put it to letterbox mode and use the extra space by using the application API to figure out what the boundaries are.

Anyhow, for a particular game I wanted to force HTML5 to look like a portrait game, but most desktop users have a landscape viewer. So, how to make this work?

I exported to html5 as normal, then renamed the index.html to index2.html. After this I added the following to a text file and saved it as index.html