Skip to content

Instantly share code, notes, and snippets.

Created September 17, 2015 18:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Reenable pinch-to-zoom on obnoxious sites that disable it, like The New Yorker. Convert to a bookmarklet and install via .
var m=document.getElementsByTagName('meta');
for(var i=0; i<m.length; i++) {
if (m[i].name == 'viewport') {
if (m[i].content.indexOf('user-scalable=0') != -1 || m[i].content.indexOf('user-scalable=no') != -1) {
m[i].content = 'width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=4.0, user-scalable=1';
alert('Found & fixed.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment