Stupid-arse fucking cookie banners

(And a script to get rid of them)

I am sick and fucking tired of these stupid cunt banners about "this website uses cookies blah blah blah" fuck off. Yet another example of why legislators should not be allowed to legislate on technical subjects because they don't have a fucking clue what they're talking about. And of why the EU is a piece of shit.

Some bunch of stupid fucking cunts in Brussels have come up with this moronic idea of making websites put up a load of stupid blah about them using cookies. And the websites, instead of being sensible and locating said stupid blah down at the bottom of the page where it ought to be, instead tend to be giant cunts about it and shove it in your face with some massive banner that gets right in the fucking way, floating on top of everything and refusing to disappear.

And what makes it worse is that the reason it refuses to disappear is that cookies are blocked in the browser. For fuck's sake. They are all the fucking same; in order to stop the fucking thing coming up you have to allow it to set a cookie. When in fact the whole business is irrelevant because cookies are blocked and I just want it to fuck the fuck off so I can read the website without this stupid bunch of crap getting in the way.

If they wanted to do something useful with their fucking legislation they should legislate against websites that fail if cookies are blocked. Especially when they fail silently. Websites DO NOT NEED TO SET FUCKING COOKIES unless you are actually logging in. There is NO FUCKING NEED AT ALL for them to rely on cookies for basic functionality. Why the pissing fuck can I not look up train times without allowing cookies, for instance? Answer: no fucking reason whatsoever except that the cunt who wrote is a frantic fucking stupid moron who hasn't got a fucking clue what he's doing and whose insistence on making cookies a requirement for something that has no earthly pissing need to store state demonstrates that he should not be allowed anywhere near the source code of any fucking website. And the same goes for all the other shite-arsed websites that do the same kind of stupid crap.

They should make it clear to people that browsers have settings to disable cookies and encourage people to use these settings. They should make official representations to Microsoft and Apple and Google and Opera and Mozilla to the effect that the default value for these settings should be to block cookies, not fucking allow them. They should write to web design outfits telling them to make sure that their "developers" are sufficiently intelligent that they do not automatically assume cookies are enabled. They should write to the operators of websites that fail if cookies are blocked and issue official instructions to rewrite them not to use cookies.

Do they do any of this? Do they fuck. They just come out with stupid blah that makes the whole business more of a pain in the arse, not less of one.

So thanks to these fucking stupid bastards and their pain in the arse pointless futile annoying shite, today I wrote a script to get rid of their shite. I present it here for the sake of interest and as an inspiration to people who might otherwise not think of writing their own. If you use it yourself you will need to edit at least the shite_words_x arrays to cover cases it doesn't handle and shit like that. And probably other stuff as well if you care more than me about collateral damage from things like cookie banner functionality being part of some larger script and the whole thing no longer working - which more often than not I consider a bonus as whatever else the script does is usually also fucking annoying and not having it improves the site.

Download script: Cookie Banner Buster

(function() { var shite_words_1, shite_words_2, shite_style, shite_inited; shite_words_1 = ['cookies', 'policy', 'website', 'close']; // Fast test keywords shite_words_2 = ['cookies', 'policy', 'website']; // Slow test keywords shite_style = false; shite_inited = false; function init_shite() { // Convert shite_words_2[] to regexp var i; if (!shite_inited) { shite_inited = true; for (i=0; shite_words_2[i]; i++) shite_words_2[i] = new RegExp('\\b' + shite_words_2[i] + '\\b', 'i'); } } function save_shit(s) { // Save deleted shite in deactivated form for debugging var d; if (!shite_style) { shite_style = true; d = document.createElement('style'); d.appendChild(document.createTextNode('.deactivated_shite { display: none; }')); document.head.appendChild(d); } d = document.createElement('div'); d.className = 'deactivated_shite'; d.appendChild(document.createComment(s)); document.body.appendChild(d); } function is_shit(s) { // Test whether a string is cookie banner shite or not var x, y, j; x = s.toLowerCase(); // Initial fast test using indexOf() y = 0; for (j=0; shite_words_1[j]; j++) if (x.indexOf(shite_words_1[j]) >= 0) y++; if (y != shite_words_1.length) return false; // Second pass slow test using regexp matching y = 0; if (!shite_inited) init_shite(); for (j=0; shite_words_2[j]; j++) if (shite_words_2[j].test(x)) y++; if (y != shite_words_2.length) return false; save_shit(s); return true; } function fuckbanner() { // Find static banner div and get rid of the fucker var e, i, x; e = document.getElementsByTagName('div'); for (i=0; e[i]; i++) { x = e[i].id + e[i].className; if (x.toLowerCase().indexOf('cookie') >= 0) { if (is_shit(e[i].innerHTML)) { e[i].parentNode.removeChild(e[i]); break; } } } } function fuckscript(e) { // Find script that inserts banner and kill the cunt if (!is_shit(e.element.text)) return; e.preventDefault(); e.element.parentNode.removeChild(e.element); } window.opera.addEventListener('BeforeEvent.DOMContentLoaded', fuckbanner, true); window.opera.addEventListener('BeforeScript', fuckscript, true); })();

Back to Pigeon's Nest

Be kind to pigeons

Valid HTML 4.01!