Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to block an element without blocking ads? #2632

Closed
annada-behera opened this issue May 20, 2017 · 5 comments
Closed

How to block an element without blocking ads? #2632

annada-behera opened this issue May 20, 2017 · 5 comments

Comments

@annada-behera
Copy link

I want to support a site, so I prefer not to run uBlock on that particular site. But the site has a facebook comment plug-in. Now, I don't want to be tracked by facebook, so, I want to block facebook's plug-in without blocking the ads by Google or the site's own advertising. How can I do that? Is it even possible?

@mapx-
Copy link

mapx- commented May 20, 2017

if your site is www.example.com, add these rules in "my rules"

www.example.com * * allow
www.example.com facebook.net * block
no-cosmetic-filtering: www.example.com true

@mapx-
Copy link

mapx- commented May 20, 2017

@gorhill , I noted all the elements are whitelisted but not
||cm.g.doubleclick.net^ -- worker https://cm.g.doubleclick.net/push?client=ca-pub-7670433186403461&srn=gdn

tested on https://www.dcnews.ro/livetext-simona-halep-kiki-bertens-roma-2017-semifinale_543387.html

@gorhill
Copy link
Owner

gorhill commented May 20, 2017

Closing and marking as invalid, as per CONTRIBUTING.

@gorhill
Copy link
Owner

gorhill commented May 20, 2017

@mapx- Yes, the worker issue was reported here #2556. It should be fixed with dev build, I forgot to check. In any case, this line means uBO injected a child-src CSP to prevent workers, which would be of no consequences if the page/frame is not using workers (it's still not that common).

Edit: yes, fixed in current dev build.

@gorhill
Copy link
Owner

gorhill commented May 20, 2017

Regarding tracking by Facebook and other such sites: https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-to-easily-reduce-privacy-exposure.

So if you have that rule beforehand to block facebook.com everywhere, than @mapx- suggestion would become simply:

www.example.com * * allow
no-cosmetic-filtering: www.example.com true

Since the rule * facebook.com * block takes precedence over the rule www.example.com * * allow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants