From 32ad13e05be94a1136b8218f5f74a09ea44ac7df Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 21 Jan 2019 23:18:04 +0100 Subject: Reduce touch (mobile) UI lag. --- html/mobile.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'html/mobile.js') 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)); +} -- cgit v1.2.3