Check javascript calls for gmail buttons

I am working on a greasemonkey script for gmail in which it would be very useful to know which function call is executed when the "Submit" button is clicked. (I could not find this using firebug, but relatively new to javascript debugging.) It seems like it should be able to detect this, I just don't know which tools to use.

Thanks so much for any help.

ps ultimately the goal here is to be able to retrieve a unique id message for outgoing gmail messages, which, as I understand it, will be present in this javascript call, so if there is an alternative way to do this, it will work just as well .

+2
javascript greasemonkey gmail
Mar 23 '09 at 20:34
source share
4 answers

Gmail Javascript code is obfuscated to avoid this type of validation (and also reduce code size). It is very unlikely that you will be able to make heads or tails, even if you manage to correctly set Firebug to a breakpoint.

+2
Mar 24 '09 at 5:21
source share

I do not think that the message identifier will be in the created message (in fact, all headers will be absent). I assume that they were sent by Google to the server on the side before sending the message.

+1
Nov 02 '10 at 20:19
source share

All objects in JavaScript have a toString() method. If you can find a button, you can find events related to it. You can toString() those events in the FireBug console, but as levik wrote; all code if it is confusing, so you can just put toString() 'gibberish.

Here's a bit of pseudo code to get you started:

 document.getElementById("...").onclick.toString() 




Update

It seems that it is not possible to access the events added with attachEvent() and addEventListener() unless you have control over the code you want to debug.

0
Mar 24 '09 at 15:28
source share

As a side element, we can assume that a unique identifier is assigned on the server, and not in javascript ...

0
Mar 25 '09 at 13:17
source share



All Articles