How to add on to an existing onclick event?
- by Corey Sarnia
I'm currently writing a Greasemonkey script for a page, so I can't modify the script myself.
There is a form submit button on the page. When you click this button, it executes some fancy AJAX calls and such to update the page and do serverside things. What I'm trying to is basically set a "lastClick" value when the button is clicked.
I want to add the code GM_setValue("lastClicked", (new Date()).getTime().toString()) to store the last time the button was clicked (for future uses of the script, it will actually do something with this date).
How exactly can I accomplish this?