Fix challenge link generation

pull/43/head
Lynn 2022-01-18 22:15:53 +01:00
rodzic e9ab562aac
commit 6583be1968
1 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

@ -27,10 +27,7 @@ function randomTarget(wordLength: number): string {
}
function getChallengeUrl(target: string): string {
return window.location.href.replace(
/(\?.*)?$/,
"?challenge=" + encode(target)
);
return window.location.origin + window.location.pathname + "?challenge=" + encode(target);
}
let challengeString = "";