diff --git a/src/Game.tsx b/src/Game.tsx index 1e2dc06..81dad7c 100644 --- a/src/Game.tsx +++ b/src/Game.tsx @@ -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 = "";