In order to cleanup the DOM by some dynamically generated empty divs, I have written the following jQuery scripts, basically I have divs containing empty span and br and div containing nothing, they all need to vanish. By executing them from the console in the following order I have found that they will perfectly clean my document without leaving a single empty div.
$('.release--content div span:empty').remove();
$('.release--content div br:empty').remove();
$('.release--content div:empty').remove();
Is there a way to avoid to run multiple separated scripts by writing a single script? Thank you.