summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGalin Simeonov <gts@volconst.com>2021-10-20 11:53:48 +0300
committerGalin Simeonov <gts@volconst.com>2021-10-20 11:53:48 +0300
commit9dbd5bd3635dd770b61034ec23fc4d899dedf408 (patch)
tree7987210b57c31cba7d0953407d2aa9abd2e57978
parent8ba9a960c8850ff96e09a3d92ef8a291620d2b41 (diff)
downloadsnek-9dbd5bd3635dd770b61034ec23fc4d899dedf408.tar.gz
onload in body html element is removed so there is no inline js
-rw-r--r--snek.html4
-rw-r--r--snek.js1
2 files changed, 3 insertions, 2 deletions
diff --git a/snek.html b/snek.html
index 70b2504..072079c 100644
--- a/snek.html
+++ b/snek.html
@@ -4,11 +4,10 @@
<head>
<title> ANGRY SNEK </title>
<meta charset="utf-8">
- <script src="snek.js"></script>
<link rel="stylesheet" href="snek.css">
</head>
-<body onload="main()">
+<body>
<noscript>
<pre>
_____________________
@@ -31,6 +30,7 @@
</pre>
</noscript>
<canvas id="canvas1"></canvas>
+ <script src="snek.js"></script>
</body>
</html>
diff --git a/snek.js b/snek.js
index df66c18..6afe00e 100644
--- a/snek.js
+++ b/snek.js
@@ -471,3 +471,4 @@ function checkScore()
alert("You are winner!");
}
}
+main();