SeeStack

Add titles to Substack redirect links in Gmail, exposing the target URL

Vous devrez installer une extension telle que Tampermonkey, Greasemonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Userscripts pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension de gestionnaire de script utilisateur pour installer ce script.

(J'ai déjà un gestionnaire de scripts utilisateur, laissez-moi l'installer !)

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

(J'ai déjà un gestionnaire de style utilisateur, laissez-moi l'installer!)

Auteur
Kevin Shay
Installations quotidiennes
0
Installations (total)
6
Notes
0 0 0
Version
0.12
Créé
22/11/2023
Mis à jour
05/12/2023
Taille
3,89 ko
Licence
N/A
S'applique à

Newsletters sent via Substack often contain links added by the author. The links in the email go to a redirect service on the Substack site. Click them and you’ll arrive at the intended page, but there’s no way to tell, by mousing over these opaque URLs, where you’ll end up or what site the author linked to.

This script tries to address this, at least when you’re reading newsletters in Gmail on a desktop web browser. It looks for Substack redirect links within a message, tries to determine where each one redirects to, and adds a title tag to the link containing the destination URL, which will appear as a tooltip when you hover the mouse cursor over the link. It does not modify the link URL itself; the intention is not to circumvent Substack’s tracking, but simply to provide some transparency into where the links lead.

This initial version has a few caveats.

  • First of all, it currently needs to work (see code comment for details) by handling errors when fetching the redirect URLs, so you’ll see errors if you happen to have the browser’s console open. (Gmail itself tends to throw lots of errors in there too!)
  • Also, it uses a simple delay to try to wait until the email has been loaded; this can certainly be improved.
  • Finally, it would be preferable to inspect each link only when you hover over it rather than all at once, but trying to do it this way seemed to provide a worse user experience (see code for details).

Bug reports and feature requests are welcome. I’ll put the script on GitHub if there’s any interest.