Merge pull request #24 from omajoshi/utrp_23
This commit is contained in:
@@ -465,7 +465,9 @@ function getDescription(course_info) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadNextPages() {
|
function loadNextPages(num_pages) {
|
||||||
|
if (num_pages === undefined) num_pages = 1;
|
||||||
|
if (num_pages == 0) return;
|
||||||
chrome.runtime.sendMessage({
|
chrome.runtime.sendMessage({
|
||||||
command: "getOptionsValue",
|
command: "getOptionsValue",
|
||||||
key: "loadAll",
|
key: "loadAll",
|
||||||
@@ -493,6 +495,7 @@ function loadNextPages() {
|
|||||||
current.append(new_rows);
|
current.append(new_rows);
|
||||||
updateListConflictHighlighting(old_length + 1)
|
updateListConflictHighlighting(old_length + 1)
|
||||||
}
|
}
|
||||||
|
loadNextPages(n-1);
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
toggleLoadingPage(false);
|
toggleLoadingPage(false);
|
||||||
$("#retrylabel").css('display', 'inline-block');
|
$("#retrylabel").css('display', 'inline-block');
|
||||||
@@ -620,3 +623,8 @@ $(window).scroll(function () {
|
|||||||
if ($(document).height() <= $(window).scrollTop() + $(window).height() + 150)
|
if ($(document).height() <= $(window).scrollTop() + $(window).height() + 150)
|
||||||
loadNextPages();
|
loadNextPages();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(window).on('load', function () {
|
||||||
|
loadNextPages(3);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user