Made a snippet for the Unread Post since last visit page to auto update itself without all the refresh, ugly code
At least it updates and you can catch up the latest news!
var script = document.createElement('script');
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js';
script.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(script);
script.onload = function() {
setTimeout('confirminit()',1000)
};
function confirminit(){
$('#bodyarea').prepend('
Press to start autoupdates (12 seconds interval)
')
}
var audioElement = document.createElement('audio'); audioElement.setAttribute('src', 'http://chromaticcreative.net/bitcoin/p.mp3')
var $page
var iaa=0
function ajaxinit(){
iaa++
if(iaa>50){
$('#bodyarea').prepend('
Timeout, press to reconnect updates
');return false;
}
$.get(location.href, function(data) {
$page = $(data);
if($('#bodyarea table.bordercolor table.bordercolor tr:nth-child(2) td:nth-child(3)').html()!=$page[42].children[2].children[0].children[0].children[0].children[0].children[0].children[1].children[2].innerHTML){
audioElement .play()
}
$('#bodyarea').html($page[42].innerHTML)
setTimeout('ajaxinit();$(".catbg span").text("Bitcoin Forum")',12000)
setTimeout('$(".catbg span").text("Until Next Update: 5")',7000)
setTimeout('$(".catbg span").text("Until Next Update: 4")',8000)
setTimeout('$(".catbg span").text("Until Next Update: 3")',9000)
setTimeout('$(".catbg span").text("Until Next Update: 2")',10000)
setTimeout('$(".catbg span").text("Until Next Update: 1")',11000)
});
}