diff --git a/main.py b/main.py index a7d6b9d..b0e48db 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,7 @@ import time #import subprocess import os -VERSION = "0.4.0" +VERSION = "0.4.1" class Plugin: CPU_COUNT = 8 diff --git a/main_view.html b/main_view.html index d4259c4..0c038d9 100644 --- a/main_view.html +++ b/main_view.html @@ -99,20 +99,21 @@ await setCPUs(index, getToggleState(document.getElementById("smtToggle"))); selectNotch(ROOT_ID, await getCPUs() - 1, 8); } + + const TOGGLE_ON_CLASS = "gamepaddialog_On_3ld7T"; function setToggleState(toggle, state) { - const ENABLED_CLASS = "gamepaddialog_On_yLrDA"; - if (state && !toggle.classList.contains(ENABLED_CLASS)) { - toggle.classList.add(ENABLED_CLASS); + if (state && !toggle.classList.contains(TOGGLE_ON_CLASS)) { + toggle.classList.add(TOGGLE_ON_CLASS); } - if (!state && toggle.classList.contains(ENABLED_CLASS)) { - toggle.classList.remove(ENABLED_CLASS); + if (!state && toggle.classList.contains(TOGGLE_ON_CLASS)) { + toggle.classList.remove(TOGGLE_ON_CLASS); } } function getToggleState(toggle) { - return toggle.classList.contains("gamepaddialog_On_yLrDA"); + return toggle.classList.contains(TOGGLE_ON_CLASS); } async function toggleCPUBoost() { @@ -201,7 +202,7 @@ function selectNotch(rootId, index, elements) { // WARNING: this yeets any style in div of slider - const ENABLED_CLASS = "gamepadslider_TickActive_j418S"; + const ENABLED_CLASS = "gamepadslider_TickActive_1gnUV"; //console.log("Selecting notches up to " + index); let root = document.getElementById(rootId); root.style = "--normalized-slider-value:" + index/(elements-1) + ";"; @@ -242,131 +243,130 @@ -
+ - +