I just edit as HTML in the browser and it works
CodePudding user response:
try that...
document.querySelectorAll('div.su-spoiler-content').forEach(xDiv=>
{
if (xDiv.innerText.trim() === '')
xDiv.closest('div.su-spoiler').style.display = 'none'
})