Gmail Unreads Summary

By Winston Last update Mar 29, 2010 — Installed 2,213 times.

Gmail Adding Item to "Reply" menu

in
Subscribe to Gmail Adding Item to "Reply" menu 1 post, 1 voice

sanodor User
FirefoxWindows

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');
};

});

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel