This is a Chrome extension development question, but perhaps may not seem like one. I think it will be familiar to anyone who develops extensions for sites they do not control.
My organization is interested in a simple Chrome extension that can add a button to Gmail for users to press that is something like "report phishing". It would simply forward the currently open message to a special account for analysis. I've gotten the GMail API working in my extension, so I can search and send mails from the extension, but I'm having trouble with the part where I find out what the user has open. I guess I was hoping I could reverse-engineer the GMail DOM a bit, but it's pretty crazy dynamically generated stuff with id made up on the fly, etc. I was thinking that if I could just find the Message-ID I could search for it with the GMail API and forward the message that way.
Does anybody who's done spelunking in Gmail have any ideas/advice?
Best,
Dave J