palant / searchlinkfix

DISCONTINUED: Browser extension that prevents Google and Yandex search pages from modifying search result links when you click them. This is useful when copying links but it also helps privacy by preventing the search engines from recording your clicks.
https://palant.de/2011/11/28/google-yandex-search-link-fix
Mozilla Public License 2.0
396 stars 37 forks source link

Google search videos carousel URLs replaced too late #75

Open Sintendo opened 5 years ago

Sintendo commented 5 years ago

1) Search for something with a video carousel among the results (e.g. https://www.google.com/search?q=waffles) 2) Right click one of the video results 3) Click 'Copy Link Location'

Doing so will usually (but not consistently for some reason?) copy the garbled Google URL rather than the clean URL.

Through some rudimentary debugging, I figured out that the sequence of functions called is different for these video results compared to regular search results.

Regular search results: saveLinkTarget (from mousedown event) restoreLinkTarget (from mousedown event) restoreLinkTarget (from setTimeout in saveLinkTarget) interceptEvent (from click event, right-click menu appears at this point)

Video search results: saveLinkTarget (from mousedown event) interceptEvent (from click event, right-click menu appears at this point) restoreLinkTarget (from setTimeout in saveLinkTarget)

wesQ3 commented 5 years ago

The links in the "Top Stories" cards also show this behavior with inconsistent link rewriting.