Edit of an old Ubiquity script to work with latest version (.1.1). Opens Gmail in a new tab, as well as showing you the last couple of new messages in the preivew.
Code Used:
///////Gmail Edit Begin CmdUtils.CreateCommand({ name: "gmail", icon: "http://mail.google.com/mail/images/favicon.ico", execute: function() { Utils.openUrlInBrowser("http://mail.google.com/"); }, preview: function( pblock ) { var url = "https://mail.google.com/mail/feed/atom"; jQuery.get( url, {}, function(feedXml){ var entries = jQuery("entry", feedXml); var text = "No new mail."; if( entries.length > 0 ) { var maxEntries = 3; text = ""; entries.each(function(i) { if( i < maxEntries ) { var entry = jQuery(this); var link = entry.find("link").attr("href"); var title = entry.find("title").text(); var author = entry.find("author name").text(); var summary = entry.find("summary").text(); text += "<a href='" + link + "'>" + title + "</a><br/>"; text += "From: " + author + "<br/>"; text += summary + "<br/><br/>"; } }); } pblock.innerHTML = text ; }); } }); //////Gmail Edit End