var precache_idle_timeout_id = false;
var cids_requested = [];
+var loaded_article_ids = [];
var has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null;
//var runtime_info = reply['runtime-info'];
if (offset == 0 && infscroll_req == false) {
+ loaded_article_ids = [];
+
dijit.byId("headlines-frame").attr('content',
reply['headlines']['content']);
reply['headlines']['toolbar']);
$$("#headlines-frame > div[id*=RROW]").each(function(row) {
- if ($$("#headlines-frame DIV[id="+row.id+"]").length > 1) {
+ if (loaded_article_ids.indexOf(row.id) != -1) {
row.parentNode.removeChild(row);
+ } else {
+ loaded_article_ids.push(row.id);
}
});
row.style.display = 'none';
c.domNode.appendChild(row);
++num_added;
- } else if ($$("#headlines-frame DIV[id="+row.id+"]").length == 0) {
+ } else if (loaded_article_ids.indexOf(row.id) == -1) {
row.style.display = 'none';
row.addClassName('new');
c.domNode.appendChild(row);
++num_added;
+ loaded_article_ids.push(row.id);
} else {
row.parentNode.removeChild(row);
}