mirror of
https://github.com/zyllian/pipefall.git
synced 2025-01-18 03:32:55 -08:00
17 lines
369 B
JavaScript
17 lines
369 B
JavaScript
(function () {
|
|
"use strict";
|
|
|
|
const pipefall = document.getElementById("pipefall");
|
|
const now = document.getElementById("play-now");
|
|
|
|
const play = () => {
|
|
console.log("pipefall!");
|
|
pipefall.play();
|
|
};
|
|
|
|
now.addEventListener("click", play);
|
|
|
|
for (let pipe of document.querySelectorAll(".pipe")) {
|
|
pipe.addEventListener("click", play);
|
|
}
|
|
})();
|