I am writing a Chrome Userscript (Greasemonkey) extension to display a confirmation dialog when the user clicks on Gmail's Send button (in the compose window etc.).
I have manged to attach to the click even of the button and show a dialog when the button is clicked, by using:
addEventListener("click", function(e) { ......... }, true);
But I cannot stop the email from being sent. I have tried using:
e.stopPropagation();
e.preventDefault();
return false;
How can I stop Gmail from sending the email?