You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tt-rss/plugins/nsfw/init.js

19 lines
417 B
JavaScript

/* global Plugins */
Plugins.NSFW = {
toggle: function(elem) {
elem = elem.domNode || elem;
const content = elem.closest(".nsfw-wrapper").querySelector('.nsfw-content');
// we can't use .toggle() here because this script could be invoked by the api client
// so it's back to vanilla js
if (content.style.display == 'none')
content.style.display = '';
else
content.style.display = 'none';
}
}