Google search videos carousel URLs replaced too late
- Search for something with a video carousel among the results (e.g. https://www.google.com/search?q=waffles)
- Right click one of the video results
- 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)
The links in the "Top Stories" cards also show this behavior with inconsistent link rewriting.