aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAjay <[email protected]>2024-03-07 17:20:23 -0500
committerAjay <[email protected]>2024-03-07 17:20:23 -0500
commite9b7abd219e8116aa8ada68687a88e6a7b089fc2 (patch)
treed2dabebf8daa854b9af454457d33a78d77d9eba0 /src
parent63d330960566d3410030e63bbf59841cb62f13f1 (diff)
downloadSponsorBlock-e9b7abd219e8116aa8ada68687a88e6a7b089fc2.tar.gz
SponsorBlock-e9b7abd219e8116aa8ada68687a88e6a7b089fc2.zip
Fix rate-limiting when setting options from options page
Diffstat (limited to 'src')
-rw-r--r--src/options.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/options.ts b/src/options.ts
index 6e963288..e983498f 100644
--- a/src/options.ts
+++ b/src/options.ts
@@ -286,7 +286,7 @@ async function init() {
break;
case "resetToDefault":
Config.resetToDefault();
- window.location.reload();
+ setTimeout(() => window.location.reload(), 200);
break;
}
});
@@ -632,8 +632,7 @@ async function setTextOption(option: string, element: HTMLElement, value: string
await invidiousOnClick(checkbox, "supportInvidious");
}
- window.location.reload();
-
+ setTimeout(() => window.location.reload(), 200);
} catch (e) {
alert(chrome.i18n.getMessage("incorrectlyFormattedOptions"));
}