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

Google result link becoming a redirect again after first click #5

Closed Forage closed 10 years ago

Forage commented 11 years ago

Hi,

All URL redirects are nicely removed in the initial search results, but as soon as I click on one of the links, middle-clicking it opening it in a new tab, that link becomes a Google redirect link again.

Steps to reproduce: 1) Open Firefox (tested with version 25) 2) Provide a search query in the search field, next to the url input field 3) Check the result URLs (no redirects) 4) Middle-click on a link to open the page in a new tab

Result: 1) The link just clicked is a Google redirect link again.

Expected result: 1) The link should remain a direct link.

matagus commented 10 years ago

I'm been trying to reproduce it and I came to the conclusion that there is a misunderstanding. If you middle click a search result -you are right- it will open a new tab with a Google redirect url but -here is the trick of this addon- before any network connection is done for requesting that url/page this addon will abort it, fix the url and request the new url/page without any Google redirection.

Hope it helps to understand how it works. If you have question, please comment here :)

Forage commented 10 years ago

If what you are saying is correct, why does the url differ before and after the middle-click? (checking by hovering over the link in the search results) The result is that you can't see which links you visited unless you reload or perform the same search again.

matagus commented 10 years ago

Let me go deep a little more. When I first developed this addon, it worked by changing every single link in every google search result page you load. This is quite expensive (for the browser) and in some cases (like Google Image Search when you scroll down several times and that loads a lot of images) the browser performance get downgraded.

So, about 6 months ago I changed the way this addon works. It does not modifies every google search results links in a page anymore: it waits till you click one of them (left, right or middle button click) and intercepts the network request the way I described before.

This has the downsides you said: when you hover a link it stills shows the google redirected link, not the original, in the status bar and you can't see which links you visited. I think these two issues are worth to have, so I'l be working to fix them.

If you agree on that I will open two issues to track them and keep them under my radar and work on them.

Forage commented 10 years ago

Thanks for the clarifications.

Opening two new issues is fine by me. I hope you'll find a solution. Many thanks for your efforts.