18 lines
397 B
TypeScript
18 lines
397 B
TypeScript
import './public-path';
|
|
import ready from '../mastodon/ready';
|
|
|
|
ready(() => {
|
|
const image = document.querySelector<HTMLImageElement>('img');
|
|
|
|
if (!image) return;
|
|
|
|
image.addEventListener('mouseenter', () => {
|
|
image.src = '/error-anim.gif';
|
|
});
|
|
|
|
image.addEventListener('mouseleave', () => {
|
|
image.src = '/error-static.png';
|
|
});
|
|
}).catch((e: unknown) => {
|
|
console.error(e);
|
|
});
|