[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
2024-04-29 10:02:41 +02:00
committed by Claire
parent defd1e4024
commit fe7db7905f
5 changed files with 16 additions and 8 deletions

View File

@@ -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);
});