From 5fa051466d5f2562a868fd2920c378c59f4796f6 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Mon, 14 Apr 2025 20:22:15 -0500 Subject: [PATCH] update the service worker --- src/webpage/service.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/webpage/service.ts b/src/webpage/service.ts index d505e9f..6b21758 100644 --- a/src/webpage/service.ts +++ b/src/webpage/service.ts @@ -52,17 +52,16 @@ function samedomain(url: string | URL) { return new URL(url).origin === self.origin; } -const htmlFiles = new Set(["/index", "/login", "/home", "/register", "/oauth2/auth"]); +let enabled = "false"; +let offline = false; +const htmlFiles = new Set(["/index", "/login", "/home", "/register", "/oauth2/auth", "/reset"]); function isHtml(url: string): string | void { const path = new URL(url).pathname; if (htmlFiles.has(path) || htmlFiles.has(path + ".html")) { return path + path.endsWith(".html") ? "" : ".html"; } } -let enabled = "false"; -let offline = false; - function toPath(url: string): string { const Url = new URL(url); let html = isHtml(url);