commit b0510bee3f56b61a1fb275b548037df14b3bcae2 parent 2f186405f7a746ed805b56ac82ee14b8adb0e5d7 Author: Shiimoe <SameulFrost@tuta.io> Date: Sun, 13 Sep 2020 21:33:25 +0100 yuigit add -A Diffstat:
M | image.js | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/image.js b/image.js @@ -1,2 +1,7 @@ const mascot = document.getElementById("mascot"); -mascot.setAttribute("src", "/mascots/" + Math.floor(1 + Math.random()*14) + ".png");- \ No newline at end of file +const randomYui = () => + mascot.setAttribute("src", "/mascots/" + Math.floor(1 + Math.random()*14) + ".png"); + +randomYui(); + +mascot.addEventListener("click", randomYui)+ \ No newline at end of file