Automatically set PC Mode if unset (#2861)

* Automatically set PC Mode if unset

based on the UserAgent

* slight reduction

Reduce flash usage a bit.

Co-authored-by: Blaž Kristan <[email protected]>
This commit is contained in:
Benjamin G
2022-11-03 23:01:32 +01:00
committed by GitHub
co-authored by Blaž Kristan
parent 81d2a67948
commit 0cfda55b3a
+1 -1
View File
@@ -262,7 +262,7 @@ function onLoad()
d.addEventListener("visibilitychange", handleVisibilityChange, false);
size();
gId("cv").style.opacity=0;
if (localStorage.getItem('pcm') == "true") togglePcMode(true);
if (localStorage.getItem('pcm') == "true" || (!/Mobi/.test(navigator.userAgent) && localStorage.getItem('pcm') == null)) togglePcMode(true);
var sls = d.querySelectorAll('input[type="range"]');
for (var sl of sls) {
sl.addEventListener('touchstart', toggleBubble);