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

rediff.com | Tracking #4138

Closed
in4u opened this issue Nov 16, 2018 · 61 comments
Closed

rediff.com | Tracking #4138

in4u opened this issue Nov 16, 2018 · 61 comments

Comments

@in4u
Copy link

in4u commented Nov 16, 2018

URL(s) where the issue occurs

https://www.rediff.com

Describe the issue

Most, if not all, links (articles, categories, etc.) on the site have some suspicious tracking enabled.

Versions

  • Browser/version: Firefox 63.0.3
  • uBlock Origin version: 1.17.2

Settings

Privacy filter, Annoyances filter, Dan Pollock’s hosts file, hpHosts’ Ad and tracking servers

Notes

Each link has a mysterious and unnecessary onclick="trackURL('https://track.rediff.com/click?url=...');return false;" tracking snippet besides the normal href. The two hosts filters listed above warn about and block such links.

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

maybe needing

rediff.com##+js(set-constant.js, onclick, noopFunc)
rediff.com##+js(remove-attr.js, onclick)

@okiehsch
Copy link
Contributor

Works on my end.

@mapx- mapx- closed this as completed in 627ae60 Nov 16, 2018
mapx- added a commit that referenced this issue Nov 16, 2018
@in4u
Copy link
Author

in4u commented Nov 16, 2018

@mapx- Can you please roll back this fix? It's breaking the site. This generic filter is causing all javascript based buttons and functionality to stop working (e.g. close button on dialogs, settings, widget features, email tools, etc.).

There's a need to restrict the filter to only those links which have tracking enabled, e.g. trackURL('https://track.rediff.com/click?url=...');return false; and not everything else. Please re-open this issue until a better solution is found.

@mapx- mapx- reopened this Nov 16, 2018
mapx- added a commit that referenced this issue Nov 16, 2018
@okiehsch
Copy link
Contributor

The easy fix is to add
||track.rediff.com^ to uBO-privacy

@in4u
Copy link
Author

in4u commented Nov 16, 2018

I am not very familiar with uBO's extended syntax but is there any way to fine-tune the original fix or build a related one by tweaking certain parameters to apply only if onclick contains the tracking URL track.rediff.com or something like that? The initial fix worked very well, just that it worked a little too much!

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

You mean the second filter ?
rediff.com##+js(remove-attr.js, onclick)

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

@okiehsch do you see something blocked using that network filter ?

@okiehsch
Copy link
Contributor

okiehsch commented Nov 16, 2018

Go to

https://www.rediff.com/news/report/naidu-bars-cbi-from-carrying-out-probes-in-andhra-pradesh/20181116.htm

scroll sown to the comments and click reply.

@in4u
Copy link
Author

in4u commented Nov 16, 2018

You mean the second filter ?

Yes, if the second filter can be constrained that way, maybe it'll work. Worth testing I'd say.

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

/~https://github.com/gorhill/uBlock/wiki/Resources-Library#remove-attrjs-

Parameters:
required, attribute or list of attributes joined by |
optional, CSS selector, specifies nodes from which attributes will be removed

@okiehsch
Copy link
Contributor

CSS selector which is what in this case ?

@okiehsch
Copy link
Contributor

rediff.com##+js(remove-attr.js, onclick, .img) maybe.

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

well, this is the problem, if I use
rediff.com##+js(remove-attr.js, onclick, a) is functional = rediff.com##+js(remove-attr.js, onclick)

and will still break something.
I see no other selector or I don't know how to reference trackUrl parameter ..

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

I see that filter is working on the first page, right clicking the text in a box and inspect it => the onclick part is gone (and event stuff too). I guess a simple network filter wont remove the effect of such onclick construction

@okiehsch
Copy link
Contributor

Add

rediff.com##+js(remove-attr.js, onclick, .img)
rediff.com##+js(remove-attr.js, onclick, .black)

and click on any picture or the text under the picture. It works on my end.

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

It works for me (removing onclick on the first page):
rediff.com##+js(remove-attr.js, onclick, .black)

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

Let's see if still blocks something useful @in4u and eventually all the cases still with tracking

@okiehsch
Copy link
Contributor

okiehsch commented Nov 16, 2018

You are right
rediff.com##+js(remove-attr.js, onclick, .black) makes rediff.com##+js(remove-attr.js, onclick, .img)redundant.

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

I searched the page and I found other different classes
for example curhand

but also cases without an anchor class
<a href="https://www.rediff.com/movies" onclick="trackURL('https://track.rediff.com/click?url=___https://www.rediff.com/movies___&amp;cmp=mov1_nav&amp;lnk=mov1_nav&amp;nsrv1=ushome');return false;"><div class="n_tabnormal">Movies</div></a>

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

maybe the syntax could be modified to use a text part (like trackURL) @gorhill

@okiehsch
Copy link
Contributor

okiehsch commented Nov 16, 2018

rediff.com##+js(remove-attr.js, onclick, ##[href*=".rediff.com/"]) also works I think.

@in4u
Copy link
Author

in4u commented Nov 16, 2018

Wow, if only that function also had a parameter allowing to search for string. This could have been an open and shut case then!

Okay guys, I will test the filter rediff.com##+js(remove-attr.js, onclick, .black). Let me know if rediff.com##+js(set-constant.js, onclick, noopFunc) is also required along with it?

@okiehsch
Copy link
Contributor

okiehsch commented Nov 16, 2018

Actually I made a mistake while testing, @mapx- add ||track.rediff.com^ to your list to easily see if you still get redirected.
Now add
rediff.com##+js(remove-attr.js, onclick, .black)
and click any picture, I get the warning message.
rediff.com##+js(remove-attr.js, onclick, .img) is also needed after all.

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

right, needing .img too, I was testing only clicking the text part ..

@mapx-
Copy link
Contributor

mapx- commented Nov 16, 2018

well, @in4u you could use

||track.rediff.com^
rediff.com##+js(remove-attr.js, onclick, .img)
rediff.com##+js(remove-attr.js, onclick, .black)
rediff.com##+js(remove-attr.js, onclick, .curhand)

the first 1 to detect other places still to be fixed

@okiehsch
Copy link
Contributor

okiehsch commented Nov 16, 2018

rediff.com##+js(remove-attr.js, onclick, .curhand) does not work for me.
I tried rediff.com##+js(remove-attr.js, onclick, .icondiv) earlier and got confused, I still don't understand why this does not work for
image

@mapx-
Copy link
Contributor

mapx- commented Nov 24, 2023

use the element picker, if you find a good filter paste it here (I have no account on rediff)

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

No branches or pull requests

7 participants