User:Naohiro19/blinktalk.js

// This script is under public domain, and comes with ABSOLUTELY NO WARRANTY. // You can use/modify/redistribute without any permission.

// *** CUSTOMIZE SECTION var blinktalk_style = "color:red;font-weight:bold"; var blinktalk_cycle = 700; // (ms) no blink if null // *** // You must add .usermessage { display:none } style to your custom css

addOnloadHook(function { var e = document.getElementById('bodyContent').getElementsByTagName('div');  var blinker = function {    var mt = document.getElementById('pt-mytalk-inner');    mt.style.visibility = (mt.style.visibility != "hidden" ? "hidden" : "visible");   setTimeout(blinker, blinktalk_cycle);  }  for(var i = 0; i < e.length && i < 5; ++i) {    if(e[i].className == 'usermessage') {      e = document.getElementById('pt-mytalk').firstChild;      e.href += "?diff=cur";      e.innerHTML = '' + e.innerHTML + ' ';      if(blinktalk_cycle) blinker;      return;    }  } });