Paweł Łaba
commited on
Commit
·
8b6236c
1
Parent(s):
02a017b
zmiana w uruchamianiu proagramu
Browse files- public/index.html +1 -1
- public/script.js +3 -2
public/index.html
CHANGED
@@ -15,6 +15,6 @@
|
|
15 |
</div>
|
16 |
|
17 |
|
18 |
-
<script src="./static/script.js"></script>
|
19 |
</body>
|
20 |
</html>
|
|
|
15 |
</div>
|
16 |
|
17 |
|
18 |
+
<script src="./static/script.js?r=1" defer></script>
|
19 |
</body>
|
20 |
</html>
|
public/script.js
CHANGED
@@ -122,12 +122,13 @@ async function handleMove(index) {
|
|
122 |
|
123 |
// Inicjalizacja gry i pobranie aktualnego stanu
|
124 |
async function initGame() {
|
|
|
125 |
|
126 |
-
$('.restart').addEventListener('click', ()=>{
|
127 |
log('add event restart');
|
128 |
restart();
|
129 |
});
|
130 |
-
|
131 |
try {
|
132 |
const response = await fetch('/status');
|
133 |
const data = await response.json();
|
|
|
122 |
|
123 |
// Inicjalizacja gry i pobranie aktualnego stanu
|
124 |
async function initGame() {
|
125 |
+
console.log( $('.restart'));
|
126 |
|
127 |
+
$('.restart').addEventListener('click', (e)=>{
|
128 |
log('add event restart');
|
129 |
restart();
|
130 |
});
|
131 |
+
|
132 |
try {
|
133 |
const response = await fetch('/status');
|
134 |
const data = await response.json();
|