var listen = document.evaluate( '/html/body/table/tbody/tr/td[1]' ,document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue;
function showTheThing(s) {
var el=document.getElementById('scplaying');
if(!el) {
el=document.createElement('table');
el=listen.appendChild(el);
el.id='scplaying';
el.className='off';
el.addEventListener('click', function() {
var el=document.getElementById('scplaying');
el.className = el.className == 'off' ? 'on': 'off';
}, false);
}
el.innerHTML = s;
}
function doTheThing() {
var now=new Date();
var milli=now.getTime();
var then=parseInt(GM_getValue('milli', '0'))+50000;
if(milli > then) {
GM_xmlhttpRequest({
method: 'GET',
url: 'http://mycoffeelounge.net:8000/played.html',
headers: {
'User-agent': 'Mozilla/5.0 (compatible) Greasemonkey',
},
onload: function(resp) {
var data=resp.responseText;
data=data.replace(/.*<\/table>