Greasy Fork is available in English.

Gmail - Hover to show the URL behind a link

Make the href in each link more visible when a mouse hovers over so the user doesn't accidentally click on an unexpected (and potentially spam) link

نووسەر
chuyaguo2014
Daily installs
0
Total installs
17
Ratings
0 0 0
وەشان
0.2
Created
2022-12-11
Updated
2022-12-11
مۆڵەت
MIT
Applies to

By default, in Chrome, if you hover your mouse over a link (aka an <a> tag in HTML), the actual URL shows up in the lower left corner, which is both hard to read and hard to remember. Many spammers will hide malicious URLs behind what seems to be legit/safe text. 😕

This script will copy the actual URL and display it in a blob right next to the link (instead of the default lower left corner of the screen - which is far away) so it's easier to tell what you are clicking into.

Please see the screenshot attached to see an example from a spam email that pretended to be FedEx.

Assumptions/Potential limitations:

  1. the script checks for the presence of the 'reply' button - if found, we assume we have an email open
  2. if the link already has a title (aka the text you see when hovering) set, this script won't change it and thus wouldn't display the actual URL behind it.
  3. it takes about 0.5-1 second the first time you hover your mouse over the link for the actual URL to appear right next to it. But subsequent hovers should hopefully produce the actual URLs faster.
    • I am not sure why this delay exists! any suggestion is appreciated!