~adnano/adnano.co

d233fa5d1f0bdcaceb700175cd3fe4647a8c4def — Adnan Maolood 3 months ago d864335
Update cyoa
1 files changed, 5 insertions(+), 5 deletions(-)

M static/games/cyoa/script.js
M static/games/cyoa/script.js => static/games/cyoa/script.js +5 -5
@@ 2,19 2,19 @@ let choices = []
let current

for (let choice of document.querySelectorAll("a")) {
	choice.onclick = function (event) {
	choice.addEventListener('click', function (event) {
		event.preventDefault()
		current.classList.remove("visible")
		choose(this.hash.substr(1))
	}
	})
}

const restart = document.getElementById("restart")
if (restart) {
	restart.style.display = "none"
	restart.onclick = function (event) {
		window.location.reload()
	}
	restart.addEventListener('click', function (event) {
		this.style.display = "none"
	})
}

function choose(id) {