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
This commit is contained in:
parent
20dda5cca0
commit
e9ddd5a159
6 changed files with 36 additions and 27 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue