I would like to write a script which checks the subject-line of an email conversation for a reference number (which follows a set format), and if it finds a reference number, adds the reference number as a label to the thread.
But I would like to do this on the email conversation that I am currently viewing in the gmail web interface. Ideally right-click somewhere in the email and select "add reference as label" from the menu.
Writing the script is not the problem - the problem is how to invoke the script on the currently-viewed conversation. How can I do this? Thanks.