diff options
author | ThibG <thib@sitedethib.com> | 2019-06-08 17:40:59 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-06-08 17:40:59 +0200 |
commit | e9ddd5a159c821e3fb75ff997f40a4bca35c326c (patch) | |
tree | 028b5676511118bcc03fbee5ed3fbe68f70547cb /app/javascript/packs | |
parent | 20dda5cca0a4015a743250b4e584a3101e7675f2 (diff) |
Put poll options behind content warnings (#10983)
* Put poll options behind CWs in WebUI * Put polls behind CWs on public pages * Add poll icon to public pages CWs * Revert to not showing an icon in the CW button
Diffstat (limited to 'app/javascript/packs')
-rw-r--r-- | app/javascript/packs/public.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 93379cdb3..3135636cf 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -126,15 +126,15 @@ function main() { return false; }); - delegate(document, '.status__content__spoiler-link', 'click', ({ target }) => { - const contentEl = target.parentNode.parentNode.querySelector('.e-content'); + delegate(document, '.status__content__spoiler-link', 'click', function() { + const contentEl = this.parentNode.parentNode.querySelector('.e-content'); if (contentEl.style.display === 'block') { contentEl.style.display = 'none'; - target.parentNode.style.marginBottom = 0; + this.parentNode.style.marginBottom = 0; } else { contentEl.style.display = 'block'; - target.parentNode.style.marginBottom = null; + this.parentNode.style.marginBottom = null; } return false; |