summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyfraeviolae <cyfraeviolae>2024-01-18 19:55:12 -0500
committercyfraeviolae <cyfraeviolae>2024-01-18 19:55:12 -0500
commitd3547d01b246053c8d0eb4b274a64ab1de0d65ec (patch)
treebaf26af637970aaaf45735b88cf2014fc6093b99
parentef61e162799411535a48664948b57a2a8ff5dc21 (diff)
async instead of defer fullHEADmaster
-rw-r--r--index.html2
-rw-r--r--static/script.js14
2 files changed, 9 insertions, 7 deletions
diff --git a/index.html b/index.html
index dcad106..ef5df1c 100644
--- a/index.html
+++ b/index.html
@@ -41,6 +41,6 @@
</div>
<script src="/infinite-connections/static/corpus.js"></script>
<script src="/infinite-connections/static/script.js"></script>
- <script defer src="/infinite-connections/static/full_corpus.js"></script>
+ <script async src="/infinite-connections/static/full_corpus.js"></script>
</body>
</html>
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());
+ }
}