diff options
| author | Brendan F <EpicWolverine@users.noreply.github.com> | 2023-07-11 23:17:21 -0700 |
|---|---|---|
| committer | Brendan F <EpicWolverine@users.noreply.github.com> | 2023-07-11 23:17:21 -0700 |
| commit | 6688918a53a451f8629bb6ee0a62dee0b118d724 (patch) | |
| tree | cd8a3c5b8391f2627d214b21361c29464ddf9847 | |
| parent | 98f0a1ef745c16067ff86ad971fd208f3a05beab (diff) | |
Work around 414 URI Too Long
| -rw-r--r-- | src/app.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app.tsx b/src/app.tsx index 32559c3..1aab160 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -29,7 +29,9 @@ function App() { function reloadWithoutQueryParameters() { location.replace(location.pathname); } - const statsImportQueryParameter = new URLSearchParams(window.location.search).get('statsImport') || ""; + const urlHash = window.location.hash; + const urlQueryParametersStart = urlHash.indexOf("?"); + const statsImportQueryParameter = new URLSearchParams(urlHash.substring(urlQueryParametersStart)).get('statsImport') || ""; function importStats () { if (statsImportQueryParameter){ const importedStats = JSON.parse(statsImportQueryParameter) |
