The crazy thing about this whole newsletter and popup thing in general is that, why in the hell would I give out my email address or anything else 1 second after entering a website? How and where exactly is the connection there that makes sense?
I actually sent a strongly worded email to MIT Tech Review yesterday (there was an article on the front page) because they have 3 separate popups on first-entry to the site. Like, wtf? Have you not heard of timed popups (such as those that trigger past a certain element), or popups that don't make you want to immediately close the site?
It's so pathetic and such a 2005 trend, it's hard to believe people still do it in the most annoying way possible.
They do it because it works. Many people on the internet are not tech savvy and they just assume that in order to view the content they must input their email. It doesn't help that the close button is sometimes barely visible.
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.
I've got addons (ublock) and a Javascript bookmarklet that removes all fixed elements, it's fairly effective.
This sounds great! Can you share the code?
NTHNer but here is the one I use. It's old but it still works a treat: https://alisdair.mcdiarmid.org/kill-sticky-headers/
(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]);
}
}
})();
I rewrote this to be a little more succinct:
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