how to kill OnMouseDown events using AG?

Dolfi

Banned
Hi,

many (usually tracking or AD) providers use OnMouseDown events to trick and f*ck users/visitors. Example: Google (see below, same /w OutBrain, veeseo, etc. pp.).
For instance, if you google "test" a very prominent search hit is www.speedtest.net. If you hoover the mouse over the entry Google shows the URL http://www.speedtest.net but if you (right)click that URL it is replaced by sth like THIS.
Unfortunately not even the extension Remove Google Results Redirect does appear to work in AdGuard (I captured actual traffic).

How would I block all OnMouseDown actions on websites using AdGuard filtering (in case I really needed to enable OMD on a single site I can still excempt it from filtering)?


Thank you,
Dolfi
 
Last edited by a moderator:

avatar

Administrator
Staff member
Administrator
Looks like this userscript is outdated.

Edit it's source code and replace it to:
Code:
// ==UserScript==
// @name        Remove Google Results Redirect
// @namespace   Smiths
// @description    9 lines of code to remove all link redirection on Google Search Results. Prevents tracking and helps load times!
// @include     http://www.google.*/
// @include     https://www.google.*/
// @grant  	unsafeWindow
// @version     2.0
// ==/UserScript==
	
if(unsafeWindow.top == unsafeWindow.self){
	document.addEventListener('DOMNodeInserted',function(e){
		window.setTimeout(function(){
		var rl = document.querySelectorAll('a[onmousedown*="return rwt"]');
		for (var l=0;l<rl.length;l++)
			rl[l].removeAttribute('onmousedown');
		}, 250);}
	, false);
}
How would I block all OnMouseDown actions on websites using AdGuard filtering (in case I really needed to enable OMD on a single site I can still excempt it from filtering)?
You don't need it. onmousedown is just an event, nothing more. Google uses it to replace links in SERP, others may use it for something useful.
 

Dolfi

Banned
Looks like this userscript is outdated.
Edit it's source code and replace it to:
aaaaah! Didn't know it's so easy, will have to learn that bloody syntax :) (BTW: can you recommend a full documentation and a CheatSheet?)
Thank you for fixing ist!

You don't need it. onmousedown is just an event, nothing more. Google uses it to replace links in SERP, others may use it for something useful.
I know what OMD is/does and believe me: I do need to block it (actually it was the native task of a privacy tool to do so but I know none - so I need to use AG and/or AM for that). I have yet to find/see a site where OMD is really usefull and necessary but it is abused on many news sites to trick you into giving out information. Tracking networks like veeseo.com, plista.com and others (ab)use it to alter URLs the same way Google does.
 

avatar

Administrator
Staff member
Administrator
aaaaah! Didn't know it's so easy, will have to learn that bloody syntax :) (BTW: can you recommend a full documentation and a CheatSheet?)
The first and main question is: are you good in JS programming?
If not than it's too early for a cheatsheet:)

I know what OMD is/does and believe me: I do need to block it (actually it was the native task of a privacy tool to do so but I know none - so I need to use AG and/or AM for that). I have yet to find/see a site where OMD is really usefull and necessary but it is abused on many news sites to trick you into giving out information. Tracking networks like veeseo.com, plista.com and others (ab)use it to alter URLs the same way Google does.
There's no way to disable javascript event (as far as I know).
But let me see an example of these tracking networks work, maybe I'll figure something out.
 

Dolfi

Banned
The first and main question is: are you good in JS programming?
If not than it's too early for a cheatsheet:)
Nope. Object Pascal here. And nope. I am weak at inventing things but at least so-so at modifying. Having a good example is for me having the job almost done (worst case: trial and error)*

But let me see an example of these tracking networks work, maybe I'll figure something out.
Best example is www.spiegel.de switching between veeseo and plista (there was a 3rd I do not find anymore). Many other sites have similar (might be the owner, the german Rupert Murdoch?) over here (examples: chip.de, huffingtonpost.de).

But for today just go here and search for "Das könnte Sie auch interessieren".
You might need to reload (CTRL-F5) the site a few times to see the different vendors.


To say it again: I was glad and thankful for a single-point-solution (as /w Google), more happy about learning how to do such myself.

Yours, Dolfi

*edit: had I known that these ç%&% use common comment marks ("//") as [whatever] I had varied the URLs myself. I was a bit puzzled about the huge "header" (not uncommon in shell scripts though) but did not recognize that this is not an actual header but part of the script.)
Had these "bright" heads who "invented" that language not re-invented the wheel (violated established standards for scripting languages) life was way easier, wasn't it?
 
Last edited by a moderator:
Top