Skip to content

Instantly share code, notes, and snippets.

@ryon
Last active December 14, 2015 22:29
Show Gist options
  • Save ryon/5159151 to your computer and use it in GitHub Desktop.
Save ryon/5159151 to your computer and use it in GitHub Desktop.
Bookmarklet to enable zoom on pages that disable it in the viewport meta tag. Not well-tested, seems to work in Safari for iOS 6.
javascript:(function(){var%20vp=document.querySelector('meta[name=viewport]');if(vp){vpParts=vp.content.split(',');vpParts=vpParts.map(function(v,i,a){if(v.indexOf('user-scalable')>-1){return%20'user-scalable=1';}else{return%20v;}});vp.content=vpParts.join(',');}else{return%20false;}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment