Created
September 17, 2015 18:22
-
-
Save cdzombak/3fae303d362747915586 to your computer and use it in GitHub Desktop.
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/ .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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