Create a gist now

Instantly share code, notes, and snippets.

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 http://mrcoles.com/bookmarklet/ .
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