Created
April 27, 2018 20:55
-
-
Save jdbruxelles/b23fde62c9f26a583b0c2ea4a1d65f5a to your computer and use it in GitHub Desktop.
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 i, metas = document.getElementsByTagName("meta"); | |
if (navigator.userAgent.match(/iPhone/i)) { | |
for (i = 0; i < metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; | |
} | |
} | |
document.addEventListener("gesturestart", gestureStart, false); | |
} | |
function gestureStart() { | |
for (i = 0; i < metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment