Skip to content

Commit

Permalink
fix disable pausing
Browse files Browse the repository at this point in the history
the settings item wasn't displaying the special selections at the appropriate time
  • Loading branch information
RoderickQiu committed Apr 4, 2021
1 parent 22234fb commit 6eb7090
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 8 additions & 3 deletions settings-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ if (store.get("disable-pausing") === true) {
else
$("#disable-pausing-set-button").html(i18n.__('all-time'));
} else {
document.getElementById("disable-pausing-setting").checked = true;
document.getElementById("disable-pausing-setting").checked = false;
$("#disable-pausing-set").css("display", "none");
}

Expand All @@ -375,8 +375,13 @@ function disablePausingSpecialChange(type) {
}

function disablePausingSetting() {
if (document.getElementById("disable-pausing-setting").checked === true) store.set("disable-pausing", true);
else store.set("disable-pausing", false);
if (document.getElementById("disable-pausing-setting").checked === true) {
store.set("disable-pausing", true);
$("#disable-pausing-set").css("display", "inline-block");
} else {
store.set("disable-pausing", false);
$("#disable-pausing-set").css("display", "none");
}
}

document.getElementById("still-count-setting").checked = store.get("should-stop-locked") === true;
Expand Down
3 changes: 1 addition & 2 deletions settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@
<!-- allow disabling pausing setting -->
<div class="row">
<div class="col-1 text-center">
<input id="disable-pausing-setting" type="checkbox" onchange="disablePausingSetting()"
checked />
<input id="disable-pausing-setting" type="checkbox" onchange="disablePausingSetting()" />
</div>
<div class="col-11 text-left">
<label>
Expand Down

0 comments on commit 6eb7090

Please sign in to comment.