1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

prefetch topmost articles on headlines load

This commit is contained in:
Andrew Dolgov
2007-05-15 08:37:10 +01:00
parent 53761dda37
commit 961f4c7323
3 changed files with 27 additions and 4 deletions
+9
View File
@@ -44,9 +44,18 @@ function headlines_callback() {
if (xmlhttp.responseXML) {
var headlines = xmlhttp.responseXML.getElementsByTagName("headlines")[0];
var counters = xmlhttp.responseXML.getElementsByTagName("counters")[0];
var articles = xmlhttp.responseXML.getElementsByTagName("article");
f.innerHTML = headlines.firstChild.nodeValue;
if (articles) {
for (var i = 0; i < articles.length; i++) {
var a_id = articles[i].getAttribute("id");
debug("found id: " + a_id);
cache_inject(a_id, articles[i].firstChild.nodeValue);
}
}
if (counters) {
debug("parsing piggybacked counters: " + counters);
parse_counters(counters, false);