// ==UserScript== // @name Gmail Conversation Auto-Updater // @namespace http://newmediarts.ca/userscripts/gmailconvupdate.user.js // @description Automatically updates a conversation in Gmail when a new message is received (not working yet!) // @include http://mail.google.com/* // @include https://mail.google.com/* // ==/UserScript== /* Written by Gabriel Mansour - http://gabrielmansour.com Idea (http://twitter.com/sillygwailo/statuses/147101302) by Richard Eriksson - http://justagwailo.com Date Created: 2007-07-12 Date Updated: 2007-07-31 Version 0.1.1 This code is released under the GNU General Public License - http://www.gnu.org/copyleft/gpl.html */ // include jQuery javascript library. One could argue that the inclusiong of this library really isn't necessary, but I'll fix that in the next version. var jq = document.createElement("script"); jq.setAttribute("src", "http://jqueryjs.googlecode.com/files/jquery-1.1.3.1.pack.js"); jq.setAttribute("type", "text/javascript"); document.getElementsByTagName('head')[0].appendChild(jq); // this is the div we need to target: $('#nmnot').change( function() { // maybe use .load() if doesn't work? this div is initially hidden {display:none} by default. is there an onShow() event we could use instead? alert("New Message!"); // testing if it works. comment out once we've got it working. $(this).find("span")[0].click(); // = top.js._CV_NewMessageUpdate(); // ^_ Google doesn't use anchors, but spans styled to look like anchors. how semantically incorrect. });