SeeStack

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

Author
Kevin Shay
Daily installs
0
Total installs
4
Ratings
0 0 0
Version
0.12
Created
2023-11-22
Updated
2023-12-05
License
N/A
Applies to

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.