Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
iOS scaling fix, iOS version < 6
<meta name="viewport" content="width=device-width initial-scale=1.0">
<script>
// iOS scaling fix
// By @mathias, @cheeaun and @jdalton
(function(e){var c="addEventListener",b="gesturestart",g="querySelectorAll",f=[1,1],d=g in e?e[g]("meta[name=viewport]"):[];function a(){d.content="width=device-width,minimum-scale="+f[0]+",maximum-scale="+f[1];e.removeEventListener(b,a,true)}if((d=d[d.length-1])&&c in e){a();f=[0.25,1.6];e[c](b,a,true)}}(document));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.