searchlinkfix icon indicating copy to clipboard operation
searchlinkfix copied to clipboard

Google search videos carousel URLs replaced too late

Open Sintendo opened this issue 6 years ago • 1 comments

  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)

Sintendo avatar Jan 27 '19 21:01 Sintendo

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

wesQ3 avatar Mar 27 '19 21:03 wesQ3