summaryrefslogtreecommitdiffstats
path: root/app/javascript/entrypoints/error.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/entrypoints/error.ts')
-rw-r--r--app/javascript/entrypoints/error.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/javascript/entrypoints/error.ts b/app/javascript/entrypoints/error.ts
new file mode 100644
index 00000000000..db68484f3a8
--- /dev/null
+++ b/app/javascript/entrypoints/error.ts
@@ -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);
+});