Guest User

Untitled

a guest
Jul 6th, 2012
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  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));
Advertisement
Add Comment
Please, Sign In to add comment