0
0
Fork 0

Convert easy entrypoints files to Typescript (#30102)

This commit is contained in:
Renaud Chaput 2024-04-29 10:02:41 +02:00 committed by GitHub
parent 4f4b77920e
commit 36909065b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 32 additions and 13 deletions

View file

@ -0,0 +1,18 @@
import './public-path';
import ready from '../mastodon/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);
});