A lightweight JavaScript game engine
git clone git://soophie.de/game-engine
38
}39
}40
}41
for(const icon of document.querySelectorAll('.icon')) {42
icon.onclick = function() {43
if(snackbar) {44
snackbar.classList.add('active');45
let time = new Date().getTime();46
setTimeout(() => {47
if(delay === time) {48
snackbar.classList.remove('active');49
}50
}, 3000);51
const value = `${icon.innerHTML}`;52
navigator.clipboard.writeText(value);53
delay = time;54
}55
}56
}57
};57
\ No newline at end of file
120
</div>121
</div>122
</footer>123
<div class="snackbar">Copied to clipboard</div>124
</body>125
</html>