|
Hi:
I am trying to add an item to the "Reply" menu when I open any email in gmail. Here's my snippet, which does not work , could you please advice , it I am missing something here?
// ==UserScript==
// @name Export Link
// @description Provide the export button.
// @version 0.1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3...
// @include *
// ==/UserScript==
//
$(document).ready(function() {
var GMAIL = null;
// Loads Gmail-Greasemonkey API (http://code.google.com/p/gmail-greasemonkey/wik...)
if (unsafeWindow.gmonkey) {
unsafeWindow.gmonkey.load('1.0', init);
}
function init(obj) {
GMAIL = obj;
create_exportButton();
};
function create_exportButton(){
var body = winActiveViewElement();
var jbody=($body);
/ Custom "DIV" New Option for the "Reply" Button.
var llexport_Content = '  Export Button ';
//Add to the Reply Menu
jbody.find('div.b7.J-M').find('div.J-N').parent.after(llexport_Content);
};
function winActiveViewElement() {
return $('iframe#canvas_frame', parent.document).contents().find('div.nH.q0CeU.z');
};
});
|