about summary refs log tree commit diff
path: root/app/javascript/packs
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-02-15 23:33:25 +0100
committerGitHub <noreply@github.com>2019-02-15 23:33:25 +0100
commit80388a3ffe654f5aec0dc94ce9976b4e9fe257ae (patch)
tree4c9dc7e634b590224c1e2d26a191e3751486a5e0 /app/javascript/packs
parent71e28ba39993d6eb3c5966e20214214c9d81b173 (diff)
Change error graphic to hover-to-play (#10055)
Fix #6060
Diffstat (limited to 'app/javascript/packs')
-rw-r--r--app/javascript/packs/error.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/javascript/packs/error.js b/app/javascript/packs/error.js
new file mode 100644
index 000000000..685c89065
--- /dev/null
+++ b/app/javascript/packs/error.js
@@ -0,0 +1,13 @@
+import ready from '../mastodon/ready';
+
+ready(() => {
+  const image = document.querySelector('img');
+
+  image.addEventListener('mouseenter', () => {
+    image.src = '/oops.gif';
+  });
+
+  image.addEventListener('mouseleave', () => {
+    image.src = '/oops.png';
+  });
+});