11/19/2022, 3:56:47 PM
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.
