webui : add ?m=... and ?q=... params (#12148)
* webui : add ?m=... and ?q=... params * also clear prefilledMessage variable * better approach * fix comment * test: bump timeout on GITHUB_ACTION
This commit is contained in:
parent
ece9745bb8
commit
7b69003af7
4 changed files with 48 additions and 3 deletions
|
@ -118,3 +118,11 @@ export const throttle = <T extends unknown[]>(
|
|||
}, delay);
|
||||
};
|
||||
};
|
||||
|
||||
export const cleanCurrentUrl = (removeQueryParams: string[]) => {
|
||||
const url = new URL(window.location.href);
|
||||
removeQueryParams.forEach((param) => {
|
||||
url.searchParams.delete(param);
|
||||
});
|
||||
window.history.replaceState({}, '', url.toString());
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue