Skip to content

Loading…

How to block ads inside an extension? #1137

Closed
jemminger opened this Issue · 4 comments

2 participants

@jemminger

I've got the delicious.com extension for chrome installed, and it seems now they're serving ads through it after you bookmark a page.

The ad container is identified by .compose-result .post-bookmark-ad-container, but I can't seem to block it because of the default whitelist chrome-extension-scheme

Example:
screen shot 2015-03-31 at 10 41 27 am

Is it possible to block these ads?

@gorhill

Can you show me the URL of the image?

@jemminger

Do you mean the URL of the coupon ad image in the sample above? It looks like it's Google ads:

screen shot 2015-03-31 at 10 53 16 am

The ads are being embedded in the delicious.com chrome extension: https://chrome.google.com/webstore/detail/delicious-bookmarks-exten/mnaelnkmidnndgikjbiifihgklnocljd

@gorhill

uBlock does not inject its content scripts on other extension pages. However, you can block behind-the-scene network requests, but this can potentially break important browser functionality, or other extensions. This can be worked around however using dynamic filtering. Here is what you could try, to block the downloading of the ad above but nothing else in the behind-the-scene scope:

  • Enable "Advanced user mode" in the Settings pane.
  • Add the following rules to the "My rules" pane (click Edit, paste the rules, click Save):
    • behind-the-scene * * allow
    • behind-the-scene pagead2.googlesyndication.com * block
  • Make the rules stick by clicking "Commit" on that page.
  • Go to the "Whitelist" pane, remove behind-the-scene, apply changes.

See if this works -- I didn't try it, hopefully I got the details right.

@jemminger

Yes! That seems to work. Thanks

@jemminger jemminger closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.