I'm trying to develop firefox addon with addon builder.
I want to modify mail editor of a web-based mailer. (In following code, I'm trying with Yahoo! Japan's mail service.)
I want to execute specific code when the user press Send button.
The addon code is:
main.js
var self = require("self");
var pageMod = require("page-mod");
pageMod.PageMod({
include: "*.mail.yahoo.co.jp",
contentScriptWhen: 'end',
contentScript: "document.getElementById('send_top').setAttribute('onclick', 'alert(\"blabla\")');"
});
The button in email editor page:
<input id="send_top" class="inputbutton" type="submit" title="Submit an email"
value="Submit" name="action_msg_send" accesskey="9">
When the user "Submit" button, I want to show dialog.