about summary refs log tree commit diff
path: root/app/javascript/packs
diff options
context:
space:
mode:
authorabcang <abcang1015@gmail.com>2018-01-24 21:29:46 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-01-24 13:29:46 +0100
commit8cd2828e91edb0f6ede8b68bf04540c3c8432a38 (patch)
treeee0687f3ffc2966d1e5a237f7a72cc4474ce7900 /app/javascript/packs
parent3d881eed271ea0541891f872c33f15f20ea3e421 (diff)
Fix hide and show media button on admin page (#6347)
Diffstat (limited to 'app/javascript/packs')
-rw-r--r--app/javascript/packs/admin.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/javascript/packs/admin.js b/app/javascript/packs/admin.js
index 993827db5..2bf1514a9 100644
--- a/app/javascript/packs/admin.js
+++ b/app/javascript/packs/admin.js
@@ -28,13 +28,13 @@ delegate(document, batchCheckboxClassName, 'change', () => {
 });
 
 delegate(document, '.media-spoiler-show-button', 'click', () => {
-  [].forEach.call(document.querySelectorAll('.activity-stream .media-spoiler-wrapper'), (content) => {
-    content.classList.add('media-spoiler-wrapper__visible');
+  [].forEach.call(document.querySelectorAll('button.media-spoiler'), (element) => {
+    element.click();
   });
 });
 
 delegate(document, '.media-spoiler-hide-button', 'click', () => {
-  [].forEach.call(document.querySelectorAll('.activity-stream .media-spoiler-wrapper'), (content) => {
-    content.classList.remove('media-spoiler-wrapper__visible');
+  [].forEach.call(document.querySelectorAll('.spoiler-button.spoiler-button--visible button'), (element) => {
+    element.click();
   });
 });