Update webutil.js

Use history API's replaceState() method to hide query for privacy
This commit is contained in:
Astrid 2023-09-15 04:58:32 +02:00 committed by GitHub
parent 370f21b117
commit 978b1023d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ export function getQueryVar(name, defVal) {
if (typeof defVal === 'undefined') { defVal = null; }
if (match) {
history.replaceState(null, "", window.location.pathname.slice(1, 1));
return decodeURIComponent(match[1]);
}