Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

userChrome.css not working (trying to block "Mozilla VPN" advertisements)

  • 2 uphendule
  • 1 inale nkinga
  • 29 views
  • Igcine ukuphendulwa ngu cor-el

more options

I do not wish to see advertisements for Mullvad on my Private Browsing new tab pages. But I can't even seem to opt out of them, as they remain even after searching "Sponsored" in about:preferences and unchecking all the applicable boxes. uBlock Origin also seemed unable to remove them, even with a custom filter and after enabling it on about-scheme.

So I went to fix it with userchrome CSS, by adding the following to a file named userChrome.css inside a folder named chrome inside my profile folder (after setting toolkit.legacyUserProfileCustomizations.stylesheets to True):

[code] /* Remove advertisements for Mozilla VPN */ @-moz-document url(about:privatebrowsing) { .promo { display: none !important; } } /code

However, even after restarting the browser, these advertisements are still present.

What am I doing wrong?

I do not wish to see advertisements for Mullvad on my Private Browsing new tab pages. But I can't even seem to opt out of them, as they remain even after searching "Sponsored" in about:preferences and unchecking all the applicable boxes. uBlock Origin also seemed unable to remove them, even with a custom filter and after enabling it on about-scheme. So I went to fix it with userchrome CSS, by adding the following to a file named userChrome.css inside a folder named chrome inside my profile folder (after setting toolkit.legacyUserProfileCustomizations.stylesheets to True): [code] /* Remove advertisements for Mozilla VPN */ @-moz-document url(about:privatebrowsing) { .promo { display: none !important; } } [/code] However, even after restarting the browser, these advertisements are still present. What am I doing wrong?
Ama-screenshot ananyekiwe

Isisombululo esikhethiwe

That CSS code needs to be in userContent.css (webpages) and not in userChrome.css (user interface). Note that Web extensions do not work on about pages, so only userContent.css will work in cases like this.

Can you attach a screenshot that shows the promo in the Inspector ?

You can right-click and select "Inspect" to open the built-in Inspector with this element selected.

See also:

Funda le mpendulo ngokuhambisana nalesi sihloko 👍 1

All Replies (2)

more options

Firefox is a work in progress and, to allow for continuous innovation, Mozilla cannot guarantee future updates won’t impact your customizations. For this reason, Mozilla does not officially support style rules customization.

Please read Firefox Advanced Customization and Configuration Options to learn more.

more options

Isisombululo Esikhethiwe

That CSS code needs to be in userContent.css (webpages) and not in userChrome.css (user interface). Note that Web extensions do not work on about pages, so only userContent.css will work in cases like this.

Can you attach a screenshot that shows the promo in the Inspector ?

You can right-click and select "Inspect" to open the built-in Inspector with this element selected.

See also: