From: Andrew Dolgov Date: Thu, 25 Jan 2007 09:12:33 +0000 (+0100) Subject: implement CDM auto-catchup for articles X-Git-Tag: 1.2.8~36 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ba0978c86db54fe397cd4c68fc90b9e1008af4b4;p=tt-rss.git implement CDM auto-catchup for articles --- diff --git a/backend.php b/backend.php index 71bbcea4..223842f3 100644 --- a/backend.php +++ b/backend.php @@ -534,9 +534,9 @@ print "
"; - print "
$updated_fmt, - Toggle unread + print "
$updated_fmt $id +
"; print " ctr.offsetHeight && + e.offsetTop + e.offsetHeight >= ctr.scrollTop && + e.offsetTop + e.offsetHeight <= ctr.scrollTop + ctr.offsetHeight) { + + ids.push(e.id.replace("RROW-", "")); + + } + + } + + e = e.nextSibling; + } + + debug("cdmWatchdog, ids= " + ids.toString()); + + if (ids.length > 0 && xmlhttp_ready(xmlhttp_rpc)) { + + for (var i = 0; i < ids.length; i++) { + var e = document.getElementById("RROW-" + ids[i]); + if (e) { + e.className = e.className.replace("Unread", ""); + } + } + + var query = "backend.php?op=rpc&subop=catchupSelected&ids=" + + param_escape(ids.toString()) + "&cmode=0"; + +/* xmlhttp_rpc.open("GET", query, true); + xmlhttp_rpc.onreadystatechange=all_counters_callback; + xmlhttp_rpc.send(null); */ + + } + + _cdm_wd_timeout = window.setTimeout("cdmWatchdog()", 5000); + + } catch (e) { + exception_error(e, "cdmWatchdog"); + } + +}