From 1ccb1d0e7c5ce9f6da0201b17a17a74aac6b1cf5 Mon Sep 17 00:00:00 2001 From: SimonFJ20 Date: Thu, 26 Sep 2024 00:53:49 +0200 Subject: [PATCH] remove refer when logged in --- public/login.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/login.js b/public/login.js index 5840bd2..a109188 100644 --- a/public/login.js +++ b/public/login.js @@ -23,6 +23,9 @@ document.querySelector("#login").onsubmit = async (event) => { window.location.pathname = "/"; return; } - window.location.pathname = decodeURIComponent(params.get("refer")); + const refer = decodeURIComponent(params.get("refer")); + params.delete("refer") + window.location.search = params.toString(); + window.location.pathname = refer; };