Created
February 1, 2012 11:09
-
-
Save kageroh/1716580 to your computer and use it in GitHub Desktop.
しょぼかる通知プラグイン
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global) { | |
var nowline = document.getElementById('nowline'); | |
setInterval(function() { | |
var items = document.querySelectorAll('td.v3dayCell:last-child div.pid-item'); | |
for (var i = items.length; i--;) { | |
var item = items[i]; | |
var itemTop = parseFloat(item.style.top); | |
var itemBottom = parseFloat(item.style.height) + itemTop; | |
var nowlineTop = parseFloat(nowline.style.top); | |
if (itemTop <= nowlineTop && | |
nowlineTop <= itemBottom && | |
!item.alerted) { | |
item.alerted = true; | |
var title = item.querySelector('a.v3title').textContent; | |
alert(title); | |
break; | |
} | |
} | |
}, 60000); | |
}(this)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment