Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Learn More

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

  • 2 odpovede
  • 1 má tento problém
  • 26 zobrazení
  • Posledná odpoveď od 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?

Priložené obrázky

Vybrané riešenie

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:

Čítať túto odpoveď v kontexte 👍 1

Všetky odpovede (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.

Pomohla vám táto odpoveď?

more options

Vybrané riešenie

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:

Pomohla vám táto odpoveď?

Položiť otázku

Ak chcete pridať odpoveď, musíte sa prihlásiť k svojmu účtu. Ak účet doteraz nemáte, položte novú otázku.