Skip to content

Instantly share code, notes, and snippets.

@niw
Created August 15, 2009 12:20
Show Gist options
  • Save niw/168338 to your computer and use it in GitHub Desktop.
Save niw/168338 to your computer and use it in GitHub Desktop.
A bookmarklet for iPhone which improve a view of any website on MobileSafari
<html>
<body>
<p>Drag next link to Bookmark then sync with iPhone.</p>
<a href="javascript:(function(){var%20m=document.createElement(%22meta%22);m.setAttribute(%22name%22,%22viewport%22);m.setAttribute(%22content%22,%22width=device-width%22);document.getElementsByTagName(%22head%22)[0].appendChild(m);})();">Set Viewport</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment