aboutsummaryrefslogtreecommitdiff
path: root/html/mobile.js
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2019-01-21 23:18:04 +0100
committerhackademix <giorgio@maone.net>2019-01-28 12:37:34 +0100
commit32ad13e05be94a1136b8218f5f74a09ea44ac7df (patch)
tree1c3032fcab2ac180b7c836c1e86e4b1c3d93f7fb /html/mobile.js
parent31db0b4ea7a232dd22d96b2dd9a7dbddeaef841a (diff)
Reduce touch (mobile) UI lag.
Diffstat (limited to 'html/mobile.js')
-rw-r--r--html/mobile.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/html/mobile.js b/html/mobile.js
index 67930ae..ae80a63 100644
--- a/html/mobile.js
+++ b/html/mobile.js
@@ -1 +1,7 @@
window.isMobile = !("windows" in browser);
+if (isMobile) {
+ let s = document.createElement("script");
+ s.src = "/html/fastclick.js";
+ document.head.appendChild(s);
+ window.addEventListener("DOMContentLoaded", e => FastClick.attach(document.body));
+}