https://www.rediff.com
Most, if not all, links (articles, categories, etc.) on the site have some suspicious tracking enabled.
Privacy filter, Annoyances filter, Dan Pollock’s hosts file, hpHosts’ Ad and tracking servers
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.
maybe needing
rediff.com##+js(set-constant.js, onclick, noopFunc)
rediff.com##+js(remove-attr.js, onclick)
Works on my end.
@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.
The easy fix is to add
||track.rediff.com^ to uBO-privacy
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!
You mean the second filter ?
rediff.com##+js(remove-attr.js, onclick)
@okiehsch do you see something blocked using that network filter ?
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.
You mean the second filter ?
Yes, if the second filter can be constrained that way, maybe it'll work. Worth testing I'd say.
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
CSS selector which is what in this case ?
rediff.com##+js(remove-attr.js, onclick, .img) maybe.
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 ..
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
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.
It works for me (removing onclick on the first page):
rediff.com##+js(remove-attr.js, onclick, .black)
Let's see if still blocks something useful @in4u and eventually all the cases still with tracking
You are right
rediff.com##+js(remove-attr.js, onclick, .black) makes rediff.com##+js(remove-attr.js, onclick, .img)redundant.
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___&cmp=mov1_nav&lnk=mov1_nav&nsrv1=ushome');return false;"><div class="n_tabnormal">Movies</div></a>
maybe the syntax could be modified to use a text part (like trackURL) @gorhill
rediff.com##+js(remove-attr.js, onclick, ##[href*=".rediff.com/"]) also works I think.
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?
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.
right, needing .img too, I was testing only clicking the text part ..
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
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

No ...curhand is breaking the login
maybe you can not use the parent class / div
In the top section, Money link gives me tracking error. Also, same for some links in the blue bar just below that section.
Well, let's wait if @gorhill chimes in.
rediff.com##+js(remove-attr.js, onclick, .img)
rediff.com##+js(remove-attr.js, onclick, .black)
seems a reasonable fix, the "reply" button mentioned earlier also works with it.
Money can be fixed using
rediff.com##+js(remove-attr.js, onclick, .curhand)
but curhand is used also for login if I'm not wrong, @in4u ?
I already have that .curhand filter enabled along with the 3 other rules you shared previously. I am noticing that only the article images and links got clean but topic headings, more stories, trending now links, moneywiz live links, track my order, etc. all still have tracking enabled.
With
rediff.com##+js(remove-attr.js, onclick, .img)
rediff.com##+js(remove-attr.js, onclick, .black)
rediff.com##+js(remove-attr.js, onclick, .curhand)
you have no broken functionality, so we can add those filters ?
Haven't come across anything broken yet.
````
rediff.com##+js(remove-attr.js, onclick, .img)
rediff.com##+js(remove-attr.js, onclick, .black)
rediff.com##+js(remove-attr.js, onclick, .curhand)
rediff.com##+js(remove-attr.js, onclick, [href*=".rediff.com/"])
rediff.com##+js(remove-attr.js, onclick, [href="http://money.rediff.com"])
`````
is the best I can come up with, how does that look for you ?
Didn't test the last 2 filters before. They don't seem to break anything yet and also remove tracking from many links except from those under Moneywiz Live. This is just based on a quick cursory look. Rest will check and report later.
rediff.com##+js(remove-attr.js, onclick, [onclick^="track"])
Does not work for reinserted content ("Recommended Products For You") because is executed only once on page load.
I also see trackAppURL and some code in onmousedown.
<a rel="nofollow" onmousedown="return enc(this,'https://track.rediff.com/click?url=___https%3a%2f%2fwww.rediff.com%2fnews%2fcolumn%2fnaidu-is-rahuls-new-troubleshooter%2f20181110.htm___&service=news&clientip=23.32.20.5&source=alsoread&type=related');" href="https://www.rediff.com/news/column/naidu-is-rahuls-new-troubleshooter/20181110.htm" title="Naidu is Rahul's new troubleshooter">Naidu is Rahul's new troubleshooter</a>
rediff.com##+js(remove-attr.js, onmousedown, [onmousedown^="return enc(this,'https://track.rediff.com"])?
maybe you can not use the parent class / div
Yes, node must be selected directly.
Heh :)
<a href="http://track.rediff.com/click?url=___http://www.rediff.com/gadget?sc_cid=ushome_ntv2_gadgetntvhome___&cmp=USHP&lnk=shopping_ntv2_gadgetntvhome&nsrv1=USHP" title="#GadgetTips">#GadgetTips</a>
well, those filters of @gwarser seem to do the job (especially the first):
rediff.com##+js(remove-attr.js, onclick, [onclick^="track"])
rediff.com##+js(remove-attr.js, href, [href^="http://track."])
rediff.com##+js(remove-attr.js, onmousedown, [onmousedown^="return enc(this,'https://track.rediff.com"])
@in4u , could you test (only) these 3 filters ?
@gwarser maybe we should add use cases in the wiki for these scriptlets
https://github.com/gorhill/uBlock/wiki/Resources-Library#remove-attrjs-
@mapx- 1st and 3rd filters seem to work without breaking anything yet. But the 2nd case needs to be dealt with by some other function or way to replace the tracking link with target link extracted from it. This may be accomplished by injecting custom javascript, I guess. Does uBO's extended syntax support that?
Oh and yes, please include examples and use cases in the wiki for not only this but other scriptlets too. It'd be easier for me then to wrap my head around them!
@in4u for the second filter => what is broken ? where / which page ?
I got it on gadgets, well in this case uBo cannot help, see above an extension (firefox) which can deal with such cases.
Well, I'll add the first and third filters to the privacy list.
maybe we could add also
||track.rediff.com^ , so the user is warned will be tracked and can visit the page or use only the real link to go further
@mapx- Yes, gadgets and also a few links in the MoneyWiz Live section. It's unfortunate to know that uBO can't help in this case. So in the absence of an ability to clean such links, that ||track.rediff.com^ could be added as the next best option.
Is something like custom javascript injection under some sort of consideration or has it been decided to never implement it? I think Adguard allows it in some way. Not sure about ABP or others. What is uBO's stand on this @gorhill?
maybe uBo could implement $rewrite option (ABP's idea)
see some discussion about $rewrite:
https://github.com/uBlockOrigin/uAssets/issues/1905
see also about $rewrite here
https://adblockplus.org/filters
https://adblockplus.org/development-builds/rewriting-url-instead-of-blocking
||example.com/ad.gif$rewrite=/puppies.gif
This will simply rewrite the requests for “example.com/ad.gif” to be a request for “example.com/puppies.gif”
/(^https?:\/\/example\.com\/page-123\.php)\?.*/$rewrite=$1
This will rewrite the request to example.com/page-123.php stripping the query string: $1 matches “example.com/page-123.php”.
/(\/article\.asp\??)(.*&)?tracker=[^&]*&?(.*)?/$rewrite=$1$2$3
The will remove the “tracker” query parameter from the request URL.
maybe uBo could implement
$rewriteoption
The way the filter was designed is flawed in my opinion, I won't be implemented the way it has been defined in ABP.
In any case, the issue here is not a good basis to justify such feature, from what I read here, it's first-party tracking, and foiling it won't accomplish anything useful, because when you load a new page in your browser, the server will still know this through just its plain logs. This is not a case for uBO's filter lists.
In any case, the issue here is not a good basis to justify such feature, from what I read here, it's first-party tracking, and foiling it won't accomplish anything useful, because when you load a new page in your browser, the server will still know this through just its plain logs. This is not a case for uBO's filter lists.
I accept this closure, not particularly for the reason quoted but because the fixes implemented were the best possible given the current feature set of uBO. Whether or not the issue had valid privacy concerns, it sure had nuisance / annoyance value, at least for me. Besides, if the intended tracking could be done via logs then there's no real need for the site to go an extra mile and unnecessarily use resources or bloat pages.
Anyways, this was an insightful thread where I also learned a few things. So, an extra thanks to you guys!
I added the quote to emphasize that the non-fixed parts of your issue will not be fixed by any new scriptlet, which was the reason to close the issue.
But the 2nd case needs to be dealt with by some other function or way to replace the tracking link with target link extracted from it.
What you're asking for is link cleaner/filterer/extractor. There are dedicated extensions for that. I doubt scriptlet can take care of this.
1.
1st party ads shopping.rediff.com, @mapx- would you suggest the filter, i categorise as annoyance being 1st party
https://www.rediff.com/news
||track.rediff.com^ in ublock privacy/ easyprivacy blocking news from Recommended by Rediff.com https://www.rediff.com/news/report/pix-trump-hails-great-leader-kim-jong-un-at-hanoi-summit/20190227.htm
scroll down at bottom and find stories under recommended by rediff

well, we should remove that filter in ublock privacy
for 1. add:
||imshopping.rediff.com^
rediff.com##[href^="http://shopping.rediff.com/"], [id^="bdeal"]
leftover after adding your filter shopping ...... all over page

does this work ?
rediff.com###div_advt_right
nope
https://www.rediff.com/news still multiple shopping.....
btw how adguard is with track.rediff.com , i see in their logger no whitelist/blockade
rediff.com##.outborder:has-text(/shopping/i)
maybe it's about strict blocking
yeah strict blocking because it is scrambled between news articles , i would have liked those shopping thing if they have kept at page sideways