Merge pull request #24 from omajoshi/utrp_23

This commit is contained in:
Sriram Hariharan
2021-11-12 07:42:09 -06:00
committed by GitHub

View File

@@ -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({
command: "getOptionsValue",
key: "loadAll",
@@ -493,6 +495,7 @@ function loadNextPages() {
current.append(new_rows);
updateListConflictHighlighting(old_length + 1)
}
loadNextPages(n-1);
}).fail(function () {
toggleLoadingPage(false);
$("#retrylabel").css('display', 'inline-block');
@@ -620,3 +623,8 @@ $(window).scroll(function () {
if ($(document).height() <= $(window).scrollTop() + $(window).height() + 150)
loadNextPages();
});
$(window).on('load', function () {
loadNextPages(3);
});