Jump to content

User:Minesweeper.007/new message notice.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//new message notice

function checkMsgs() {
  var divs = document.getElementById('bodyContent').getElementsByTagName('div');
  if(divs.length <= 2) return;
  for(var i=0;i<divs.length;i++) {
    if(divs[i].className == 'usermessage') {
      divs[i].style.display = 'none';
      var talk = document.getElementById('pt-mytalk').firstChild;
      talk.style.color='#00000';
      talk.style.textDecoration='blink';
      talk.style.background='#ffffff  no-repeat 0 0';
      talk.style.paddingLeft='0px';
    }
  }
}
addOnloadHook(checkMsgs)