Skip to content

Commit 98f5759

Browse files
committed
remove infinite loop on settings page
1 parent 1d95bf6 commit 98f5759

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

scripts/settings.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ async function initialize() {
1414
if (options.icons) document.querySelector('.nap-room img').src = `../icons/${options.icons}/nap-room.png`;
1515

1616
try {updateFormValues(options)} catch(e) {}
17-
18-
chrome.storage.onChanged.addListener(async changes => {
19-
if (changes.snoozedOptions && changes.snoozedOptions.newValue) updateFormValues(changes.snoozedOptions.newValue);
20-
});
2117

2218
addListeners();
2319
await fetchHourFormat();
@@ -98,6 +94,7 @@ function addListeners() {
9894
}
9995

10096
async function save(e) {
97+
e.stopPropagation();
10198
if (e && e.target.id === 'history') {
10299
var tabs = await getSnoozedTabs();
103100
var count = tabs.filter(t => t.opened && dayjs().isAfter(dayjs(t.opened).add(e.target.value, 'd'))).length;

0 commit comments

Comments
 (0)