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 <blaz@kristan-sp.si>
pull/2870/head
Benjamin G 2022-11-03 17:01:32 -05:00 zatwierdzone przez GitHub
rodzic 81d2a67948
commit 0cfda55b3a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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);