[Glitch] Convert easy entrypoints files to Typescript

Port 36909065b5 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Renaud Chaput authored and Claire committed 2024-05-04 15:49:30 +02:00
1 parent defd1e4024
commit fe7db7905f
5 files changed
+16 -8

No files matched your search

@@ -0,0 +1,18 @@
import '@/entrypoints/public-path';
import ready from 'flavours/glitch/ready';
ready(() => {
const image = document.querySelector<HTMLImageElement>('img');
if (!image) return;
image.addEventListener('mouseenter', () => {
image.src = '/oops.gif';
});
image.addEventListener('mouseleave', () => {
image.src = '/oops.png';
});
}).catch((e: unknown) => {
console.error(e);
});