From d3547d01b246053c8d0eb4b274a64ab1de0d65ec Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Thu, 18 Jan 2024 19:55:12 -0500 Subject: async instead of defer full --- static/script.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'static') diff --git a/static/script.js b/static/script.js index a4c5d09..1f96322 100644 --- a/static/script.js +++ b/static/script.js @@ -258,10 +258,12 @@ function shuffle(array) { return array; } -var urlParams = new URLSearchParams(window.location.search); -var q = urlParams.get('q') -if (q) { - startBoard(deserializeBoard(q)); -} else { - startBoard(newBoard()); +window.onload = function() { + var urlParams = new URLSearchParams(window.location.search); + var q = urlParams.get('q') + if (q) { + startBoard(deserializeBoard(q)); + } else { + startBoard(newBoard()); + } } -- cgit v1.2.3