error.ts 383 B

123456789101112131415161718
  1. import './public-path';
  2. import ready from '../mastodon/ready';
  3. ready(() => {
  4. const image = document.querySelector<HTMLImageElement>('img');
  5. if (!image) return;
  6. image.addEventListener('mouseenter', () => {
  7. image.src = '/oops.gif';
  8. });
  9. image.addEventListener('mouseleave', () => {
  10. image.src = '/oops.png';
  11. });
  12. }).catch((e: unknown) => {
  13. console.error(e);
  14. });