even more fixes
This commit is contained in:
parent
659d2f4c4c
commit
439f70beeb
1 changed files with 9 additions and 9 deletions
|
@ -165,25 +165,25 @@ function checkbox(action) {
|
||||||
if (action == "alwaysVisibleButton") button();
|
if (action == "alwaysVisibleButton") button();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function updateToggle(toggle, state) {
|
function updateToggle(toggl, state) {
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case "true":
|
case "true":
|
||||||
eid(toggle).innerHTML = loc.toggleAudio;
|
eid(toggl).innerHTML = loc.toggleAudio;
|
||||||
break;
|
break;
|
||||||
case "false":
|
case "false":
|
||||||
eid(toggle).innerHTML = sGet(`${toggle}ToggledOnce`) == "true" ? loc.toggleDefault : loc.pressToChange + loc.toggleDefault;
|
eid(toggl).innerHTML = sGet(`${toggl}ToggledOnce`) == "true" ? loc.toggleDefault : loc.pressToChange + loc.toggleDefault;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function toggle(toggle) {
|
function toggle(toggl) {
|
||||||
let state = sGet(toggle);
|
let state = sGet(toggl);
|
||||||
if (state) {
|
if (state) {
|
||||||
sSet(toggle, opposite(state))
|
sSet(toggl, opposite(state))
|
||||||
if (opposite(state) == "true") sSet(`${toggle}ToggledOnce`, "true");
|
if (opposite(state) == "true") sSet(`${toggl}ToggledOnce`, "true");
|
||||||
} else {
|
} else {
|
||||||
sSet(toggle, "false")
|
sSet(toggl, "false")
|
||||||
}
|
}
|
||||||
updateToggle(toggle, sGet(toggle))
|
updateToggle(toggl, sGet(toggl))
|
||||||
}
|
}
|
||||||
function loadSettings() {
|
function loadSettings() {
|
||||||
if (sGet("alwaysVisibleButton") == "true") {
|
if (sGet("alwaysVisibleButton") == "true") {
|
||||||
|
|
Loading…
Reference in a new issue