Wikipedia:WikiProject User scripts/Scripts/New message history: Difference between revisions

Content deleted Content added
Alphax (talk | contribs)
m adding usage and bugs
Alphax (talk | contribs)
m adding classname
Line 1:
;Purpose : Add a link to your talk page history to the "You have new messages" warning.
;Usage : Include a call to <code>newmessagehistory()</code> in your load page function.
;Bugs : Will probably break any function called after it (ie, so it should be called last).
 
// <pre><nowiki>
Line 26:
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'));