Greasy Fork is available in English.

GMail - shorten mailing list tags

11/19/2022, 3:56:47 PM

نووسەر
cheater
Daily installs
0
Total installs
10
Ratings
0 0 0
وەشان
1.0.4
Created
2022-11-19
Updated
2022-11-19
مۆڵەت
MIT
Applies to

WHAT THIS IS

This script shortens excessively long mailing list tags that appear in subjects. You can see a before and after comparison here.

The assumption is that the tag is either in the form: [long-tag-here] rest of the subject (i.e. in square brackets and separated by a space) or it starts with "Re:", then space, then the tag, then space, then the rest of the subject.

Mailing lists with participants in another language than English might use a different reply prefix than "Re: ", you can adjust the code accordingly by duplicating the relevant if branch. This script does not handle "Fwd: ..." messages since they're rare. It does also not handle subjects of the form "Re: new subject here, Was: [long-tag-here] old sibject here". This is not a standard format and it happens rarely and it would make the logic super complex, so I don't really care.

Very rarely, the script might flash the original tags for a split second. This will also happen while you're navigating e.g. through labels or results pages. This is normal. Fixing this would introduce a lot of code so it's not worth the hassle.

If you have any questions / comments / updates, ask on the Tek/HP/Etc Discord server, or email me. My email address is on the @author tag at the top of the file, you'll have to add the @ and .com in the correct places and remove the spaces from it.

HOW TO USE THIS SCRIPT

  1. Install the ViolentMonkey addon for Firefox. There are analogous addons for other browsers.
  2. Navigate to https://greasyfork.org/en/scripts/455096-gmail-shorten-mailing-list-tags
  3. Click the big green "Install this script" button and follow instructions.
  4. Optionally, modify the user config that's marked USER CONFIGURATION SECTION.
  5. Refresh the GMail window for the script to start taking effect.

BEFORE AND AFTER COMPARISON

A "before" image showing an inbox subscribed to multiple mailing lists. The mailing list tags are excessively long and obscure the subject of the message and the starting snippet of the message itself. An "after" image showing an inbox subscribed to multiple mailing lists, showing the same messages as before. The mailing list tags are very short now and the subject of the message and starting snippet are both well visible.