mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
hgweb: call process_dates with a specified selector in ajax scroll
Now this function processes only newly added entries, and not old ones, the amount of which can be much bigger.
This commit is contained in:
parent
6ef3f6fe6f
commit
099a1df11b
@ -407,12 +407,14 @@ function ajaxScrollInit(urlFormat,
|
||||
} else {
|
||||
var doc = docFromHTML(htmlText);
|
||||
var nodes = doc.querySelector(containerSelector).children;
|
||||
var curClass = 'c' + Date.now();
|
||||
while (nodes.length) {
|
||||
var node = nodes[0];
|
||||
node = document.adoptNode(node);
|
||||
node.classList.add(curClass);
|
||||
container.appendChild(node);
|
||||
}
|
||||
process_dates();
|
||||
process_dates('.' + curClass);
|
||||
}
|
||||
},
|
||||
function onerror(errorText) {
|
||||
|
Loading…
Reference in New Issue
Block a user