matagus / remove-google-redirects-addon

🐣 Firefox addon to simply remove tracking code/redirect from Google search results. Works with firefox 20.x or superior.
http://matagus.github.com/remove-google-redirects-addon
59 stars 13 forks source link

Why not just rewriting the onmousedown function? #22

Open osenseijedi opened 8 years ago

osenseijedi commented 8 years ago

So I was looking at the code quickly (just to see how you do things) and it came to me : is there a reason why not simply rewrite the function rwt() ? This function is the functions that is being called when clicking the link. My tests in local showed that if you only do :

function rwt(a,b,c,d,e,f,g,h,i,j,k){ return true}

then the effect is the same, except the code is so much shorter. Also that would fix this other bug I had (middle click opens a new empty tab -- under FF42 kubuntu 14.04). It seems that the function name is always the same everywhere (at least on my tests), but even if it was not, you could get it automatically with a regexp on the onmousedown...

But then again, I might have missed something? I'd love to hear your inputs on that.

Cheers