GreaseMonkey script for Gmail: remove trailing quotes

Warning: this doesn’t work with GMail’s new compose UI. I’ve tried to make them play nice together, but it doesn’t look promising. :(

gmail_remove_trailing_quote.user.js is a GreaseMonkey userscript that removes “trailing quotes” from messages you compose in Gmail. It modifies your in-progress email when you move the focus away from the composition text box. If you go back to the text box, it reverts the changes it made so you can revise if necessary.

What’s a trailing quote, you ask? It’s best described by example. The last three lines in this email are a trailing quote:

On Fri, 4 Jun 2004, Jane Doe wrote:

> Thanks for the invite! Should I bring anything?

No, I have everything I need. Thanks though!

> I'll see you soon...
>
> -Jane

This script makes it easier to observe proper netiquette when quoting. If you want to quote the smallest relevant piece of an email, you often need to delete a significant amount of quoted text. This automates the drudgery of trimming that excess quoted text. (See these articles for more on trimming quotes and the top- vs. bottom-post debate.)

4 thoughts on “GreaseMonkey script for Gmail: remove trailing quotes

  1. This would have been a very useful script if there weren’t already the possibility to quote the selected text only (by enabling Settings/Labs/Quote Selected Text).

    What’s it’s not currently possible and would be very useful would be to not quote any text at all. Most of my replies are self contained so I don’t need to quote the entire message I am answering to.

    Do you think it would be possible to code a script which would allow that?

  2. thanks for the feedback! you’re right, that lab is definitely useful, and it overlaps a lot with this userscript.

    the main difference is that this script runs after you compose your message. i often figure out the details of what to say while i’m writing, including which parts of the original to quote, as part of the writing process. it’d be harder to do that up front.

    as for delete the quoted text entirely, that’s very doable. after you hit reply, you’ll see a ‘…’ box in the composer below your cursor. you may have to scroll down to see it. press the down arrow to highlight it, then press backspace. done!

  3. Hi Ryan,

    thanks a lot for your answer! I am reading it only now.

    I didn’t know that trick to easily delete the whole quotation, thanks a lot!

    What I had in mind actually was to not have the little box with ‘…’ at all in the first place.

    I thought maybe a Greasemonkey script would come in handy, something which would replace the “Reply” button with two options: “Reply with quotation” and “Reply without quotation”. Do you think that would be feasible?

Leave a Reply

Your email address will not be published. Required fields are marked *