Bug fix
This commit is contained in:
parent
dd9c9420d1
commit
6b559ca64e
2 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
||||||
browser.idle.onStateChanged.addListener(function(state) {
|
browser.idle.onStateChanged.addListener(function(state) {
|
||||||
if (state == 'idle') {
|
if (state == 'idle') {
|
||||||
browser.storage.local.get('days', function(res) {
|
browser.storage.local.get('days', function(res) {
|
||||||
if (res.days != 0) {
|
var days = res.days || 0;
|
||||||
|
if (days != 0) {
|
||||||
var end = new Date();
|
var end = new Date();
|
||||||
end.setHours(0);
|
end.setHours(0);
|
||||||
end.setMinutes(0);
|
end.setMinutes(0);
|
||||||
|
|
|
@ -4,7 +4,7 @@ function saveOptions(e) {
|
||||||
}
|
}
|
||||||
function restoreOptions() {
|
function restoreOptions() {
|
||||||
browser.storage.local.get('days', function(res) {
|
browser.storage.local.get('days', function(res) {
|
||||||
document.querySelector("#days").value = res.days || '0';
|
document.querySelector("#days").value = res.days || 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
document.addEventListener('DOMContentLoaded', restoreOptions);
|
document.addEventListener('DOMContentLoaded', restoreOptions);
|
||||||
|
|
Loading…
Reference in a new issue