== David's old JavaScript repository == 

 Note: Some of this code works, some don't. 

  

 /* Add a "history" link to the "You have new messages". */ 
 addOnloadHook( function () { 

   var messdivlist = getElementsByClassName( document, "div", "usermessage" ); 
   var messdiv = messdivlist[0]; 
   if( messdiv ) { 
     var link = document.createElement( "a" ); 
     link.appendChild( document.createTextNode( 'history' ) ); 
     link.href = wgServer + wgScript + '?title=User_talk:' + wgUserName + '&action;=history'; 
 
     messdiv.insertBefore( document.createTextNode( ', ' ), messdiv.lastChild ); 
     messdiv.insertBefore( link, messdiv.lastChild ); 
   } 
 
 } );