Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 6th, 2012  |  syntax: None  |  size: 0.78 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. (function(global) {
  2.  
  3.     var nowline = document.getElementById('nowline');
  4.  
  5.     setInterval(function() {
  6.         var items = document.querySelectorAll('td.v3dayCell:last-child div.pid-item');
  7.  
  8.         for (var i = items.length; i--;) {
  9.             var item = items[i];
  10.  
  11.             var itemTop    = parseFloat(item.style.top);
  12.             var itemBottom = parseFloat(item.style.height) + itemTop;
  13.  
  14.             var nowlineTop = parseFloat(nowline.style.top);
  15.  
  16.             if (itemTop <= nowlineTop    &&
  17.                 nowlineTop <= itemBottom &&
  18.                 !item.alerted) {
  19.  
  20.                 item.alerted = true;
  21.  
  22.                 var title = item.querySelector('a.v3title').textContent;
  23.                 alert(title);
  24.  
  25.                 break;
  26.  
  27.             }
  28.         }
  29.     }, 60000);
  30.  
  31. }(this));