diff options
author | abcang <abcang1015@gmail.com> | 2017-07-07 04:31:03 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-06 21:31:03 +0200 |
commit | f76e71825da3b185e549cd3267813fd12cee4050 (patch) | |
tree | fe4114255f5ade5356defd71dfc5de574c8d32f7 /app/javascript/packs | |
parent | 6bf6d35637abc691cf85b1c96a54c74af8b8bc2e (diff) |
Improve Activity stream spoiler (#4088)
Diffstat (limited to 'app/javascript/packs')
-rw-r--r-- | app/javascript/packs/public.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index a0e511b0a..254250a3b 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -53,8 +53,12 @@ function main() { } }); - delegate(document, '.media-spoiler', 'click', ({ target }) => { - target.style.display = 'none'; + delegate(document, '.activity-stream .media-spoiler-wrapper .media-spoiler', 'click', function() { + this.parentNode.classList.add('media-spoiler-wrapper__visible'); + }); + + delegate(document, '.activity-stream .media-spoiler-wrapper .spoiler-button', 'click', function() { + this.parentNode.classList.remove('media-spoiler-wrapper__visible'); }); delegate(document, '.webapp-btn', 'click', ({ target, button }) => { |