aboutsummaryrefslogtreecommitdiffhomepage
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
parent63d330960566d3410030e63bbf59841cb62f13f1 (diff)
downloadSponsorBlock-e9b7abd219e8116aa8ada68687a88e6a7b089fc2.tar.gz
SponsorBlock-e9b7abd219e8116aa8ada68687a88e6a7b089fc2.zip
Fix rate-limiting when setting options from options page
m---------maze-utils0
-rw-r--r--src/options.ts5
2 files changed, 2 insertions, 3 deletions
diff --git a/maze-utils b/maze-utils
-Subproject 8c0385deb54414bf5436e4a1a59e1a87f3a5f41
+Subproject 036086403f675b8fea0e22065f26ba534e35156
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"));
}