Skip to content

Instantly share code, notes, and snippets.

@timraymond
Last active December 31, 2015 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timraymond/7976209 to your computer and use it in GitHub Desktop.
Save timraymond/7976209 to your computer and use it in GitHub Desktop.
Bookmarklet to re-enable zoom. Useful for sites that annoyingly set userscalable=no without actually optimizing their content for iOS display.
javascript:document.querySelector('meta%5Bname=viewport%5D').setAttribute('content','width=device-width,initial-scale=1.0,maximum-scale=10.0,user-scalable=1');
@timraymond
Copy link
Author

Usual bookmarklet installation:

  1. Create a bookmark with the display text you want (mine is set to "Enable Zoom", and I have it on Mobile Safari's toolbar)
  2. Set the bookmark target to the above text.
  3. When you come across a site where you want to pinch-zoom, but can't, hit the bookmarklet.
  4. Enjoy being able to zoom again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment