By Jason Rhyley
—
Last update
Dec 7, 2005
—
Installed
858 times.
// ==UserScript==
// @name Bloglines Continuous Update
// @namespace http://www.rhyley.org/gm/
// @description Monitors the number of unread items via the Bloglines API. If the number increases, reloads the subscriptions panel to show the new items.
// @include http://*bloglines.com/myblogs_subs*
// ==/UserScript==
var user = "you@foo.bar"; // your bloglines login
var delay = 60; //seconds
GMupdateUnread = function() {
oldTitle = parent.window.document.title;
parent.window.document.title += ' | [updating]';
GM_xmlhttpRequest({
method: 'GET',
url: 'http://www.bloglines.com/update?ver=1&user=' + user,
headers: {
'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey',
'Accept': 'application/atom+xml,application/xml,text/xml',
},
onload: function(responseDetails) {
upNum = responseDetails.responseText.split("|")[1];
if (unsafeWindow.totalUnread < upNum) {
location.reload();
} else {
setTimeout(function (){parent.window.document.title = oldTitle + ' | [found '+ upNum +']'},1000);
setTimeout(function (){parent.window.document.title = oldTitle},4000);
}
}
});
setTimeout(function (){GMupdateUnread()},delay*1000);
}
setTimeout(function (){GMupdateUnread()},3000);