summaryrefslogtreecommitdiff
path: root/site/media/js/ios-viewport-scaling-bug-fix.js
diff options
context:
space:
mode:
Diffstat (limited to 'site/media/js/ios-viewport-scaling-bug-fix.js')
-rw-r--r--site/media/js/ios-viewport-scaling-bug-fix.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/site/media/js/ios-viewport-scaling-bug-fix.js b/site/media/js/ios-viewport-scaling-bug-fix.js
new file mode 100644
index 0000000..a33774c
--- /dev/null
+++ b/site/media/js/ios-viewport-scaling-bug-fix.js
@@ -0,0 +1,2 @@
+!function(doc){var addEvent='addEventListener',type='gesturestart',qsa='querySelectorAll',scales=[1,1],meta=qsa in doc?doc[qsa]('meta[name=viewport]'):[];function fix(){meta.content='width=device-width,minimum-scale='+scales[0]+',maximum-scale='+scales[1];doc.removeEventListener(type,fix,!0);}
+if((meta=meta[meta.length-1])&&addEvent in doc){fix();scales=[.25,1.6];doc[addEvent](type,fix,!0);}}(document); \ No newline at end of file