Chrome Userscript (Greasemonkey) - Stop Gmail from sending an email Chrome Userscript (Greasemonkey) - Stop Gmail from sending an email google-chrome google-chrome

Chrome Userscript (Greasemonkey) - Stop Gmail from sending an email


I think that those mentioned by you can prevent default action that is built-in in browser, and stop propagation of event to parent elements in DOM hierarchy. You probably need to get the Gmail's event listener and do something with it - wrap it with your function (so, remove original event listener and bind your function, which displays a dialog and then invoke Gmail's one). Currently, when you only add an event listener, there are two independent event handlers.

Those posts might be useful:
How to find event listeners on a DOM node?
How to check if any JavaScript event listeners/handlers attached to an element/document?