From e9b7abd219e8116aa8ada68687a88e6a7b089fc2 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 7 Mar 2024 17:20:23 -0500 Subject: [PATCH] Fix rate-limiting when setting options from options page --- maze-utils | 2 +- src/options.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/maze-utils b/maze-utils index 8c0385de..03608640 160000 --- a/maze-utils +++ b/maze-utils @@ -1 +1 @@ -Subproject commit 8c0385deb54414bf5436e4a1a59e1a87f3a5f41e +Subproject commit 036086403f675b8fea0e22065f26ba534e351562 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")); }