;Usage : Include a call to
newmessagehistory()
in your load page function.
//
/**** WARNING: THIS SCRIPT IS CURRENTLY UNSTABLE AND WILL KILL OTHER FUNCTIONS. ****/ /**** NO WARRANTY IS PROVIDED OR IMPLIED. ***/ // newmessagehistory addOnloadHook(function () { var divs = document.getElementsByTagName('div'); var talkmessagebox; for(var x = 0; x < divs.length; ++x) { if(divs[x].className.indexOf('usermessage') != -1) { talkmessagebox = divs[x]; x = divs.length; // force break } } var newmessagelink = talkmessagebox.getElementsByTagName('a')[0]; var historylink = document.createElement('a'); historylink.href = newmessagelink.href.replace(/\/wiki\//, '/w/index.php?title=') + '&action=history'; historylink.className = 'external text'; historylink.appendChild(document.createTextNode('changes')); var talkmessagetext = 'You have '; talkmessagebox.innerHTML = talkmessagetext; talkmessagebox.appendChild(newmessagelink); talkmessagebox.appendChild(document.createTextNode(' (')); talkmessagebox.appendChild(historylink); talkmessagebox.appendChild(document.createTextNode(')')); }); //