about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/packs
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-02-17 12:02:47 +0100
committerThibaut Girka <thib@sitedethib.com>2019-02-17 12:27:01 +0100
commit9a47f2cbdf8ef70cb93ac2b5ee2947948d1a1d04 (patch)
tree39bd10789f93bc64ce2d5dd36f6173510b040cd0 /app/javascript/flavours/glitch/packs
parent369a475a7001677493b452b9aaea1141de442c53 (diff)
Port upstream's javascript to the error page
Diffstat (limited to 'app/javascript/flavours/glitch/packs')
-rw-r--r--app/javascript/flavours/glitch/packs/error.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/packs/error.js b/app/javascript/flavours/glitch/packs/error.js
new file mode 100644
index 000000000..81c86c3ab
--- /dev/null
+++ b/app/javascript/flavours/glitch/packs/error.js
@@ -0,0 +1,13 @@
+import ready from 'flavours/glitch/util/ready';
+
+ready(() => {
+  const image = document.querySelector('img');
+
+  image.addEventListener('mouseenter', () => {
+    image.src = '/oops.gif';
+  });
+
+  image.addEventListener('mouseleave', () => {
+    image.src = '/oops.png';
+  });
+});