I've gotten to the point where if a site displays a popup, I just close the page. If I had the ability to remove that source from all future searches I would.
(function () {
var i, elements = document.querySelectorAll('body *');
for (i = 0; i < elements.length; i++) {
if (getComputedStyle(elements[i]).position === 'fixed') {
elements[i].parentNode.removeChild(elements[i]);
}
}
})(); document.querySelectorAll('body *').forEach(tag =>
getComputedStyle(tag).position === 'fixed' && tag.remove()
);
- you can use `forEach()` on the NodeList that `querySelectorAll()` returns- you can use `remove()` directly on the DOM node you want to remove
At least let them having to handle junk data.