From 0cfda55b3aff7f9bcd489a4798831ae9fb26a3fd Mon Sep 17 00:00:00 2001 From: Benjamin G Date: Thu, 3 Nov 2022 17:01:32 -0500 Subject: [PATCH] Automatically set PC Mode if unset (#2861) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Automatically set PC Mode if unset based on the UserAgent * slight reduction Reduce flash usage a bit. Co-authored-by: Blaž Kristan --- wled00/data/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/data/index.js b/wled00/data/index.js index 2cd22bbb..255393c4 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -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);