User:Greg Tyler/newmessage.js

// Hide the default box and add our own addEventListener('DOMContentLoaded',function { d = document.getElementsByTagName('div'); for(i=0;i<d.length;i++) {  if(d[i].innerHTML.substr(0,8)=='You have') {d[i].style.display="none";newMessageAlert;} } }, false);

// You can have whatever you want here function newMessageAlert { // A personal default: "my talk" goes bold document.getElementById('pt-mytalk').style.fontWeight = "bold"; // For those who need to keep track, an alert box alert("You have new unread messages!"); // Want a tab for this? addPortletLink( 'p-cactions', "http://en.wikipedia.org/wiki/Special:MyTalk", "new", "gt-new", "You have new messages on your talk page!", ""); }