How to remove Stack Exchange cookie consent popup with Stylem

This is just a quick guide on how to remove the cookie consent popup from Stack Exchange sites. I’ll probably remove this guide or re-label it in the future since it will eventually become irrelevant.
Typically these popups aren’t so bad, but this one covers things up and gets in the way. I have cookie settings to clear out upon browser exit, so it’s annoying having to re-consent to the these popups every time I happen to use any Stack Exchange site.
With the Stylem browser extension[1] for Pale Moon (and other style editing related browser extensions out there), you can disable the popup.
Create custom user style
Open the Add-ons Manager of your browser. If Stylem is installed, you should see in the add-on manager overview an option for "User Styles."

From the user styles overview, click on the "Write New Style" button.

You will be presented an editor window. From here, give the custom user style a name. In the editor, add the following.
@-moz-document domain("stackoverflow.com") {
.js-consent-banner {
visibility: hidden;
display: none;
}
}
You can add additional custom styles for each Stack Exchange site in the moz document domain address, like the following.
@-moz-document domain("stackoverflow.com") {
.js-consent-banner {
visibility: hidden;
display: none;
}
}
@-moz-document domain("superuser.com") {
.js-consent-banner {
visibility: hidden;
display: none;
}
}
@-moz-document domain("serverfault.com") {
.js-consent-banner {
visibility: hidden;
display: none;
}
}
Once you're finished, don't forget to save the user style. After saving the file you should immediately notice the cookie popup is gone.
There are a lot of different Stack Exchange sites. You can get a list of them from the Stack Exchange sites feed list.[2]
References
1. https://addons.palemoon.org/addon/stylem/
2. https://stackexchange.com/feeds/sites
[Return to top]