Comment 8 for bug 517900

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 517900] Re: manpages.ubuntu.com has broken layout when browsing with iPhone browser

What's the resolution of the iphone browser?

I added some javascript that should only display the table of contents
if the browser is wider than 790 pixels.

Can you tell me if this javascript works correctly in the iPhone browser:

function getWidth() {
        width = 0;
        if (parseInt(navigator.appVersion)>3) {
                if (navigator.appName=="Netscape") {
                        width = window.innerWidth;
                } else if (navigator.appName.indexOf("Microsoft")!=-1) {
                        width = document.body.offsetWidth;
                }
        }
        return width;
}