mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Implement infinite scrolling in commits list
This commit is contained in:
@@ -15,10 +15,25 @@ $(function () {
|
||||
readOnly: true,
|
||||
mode: mode
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
if ($('#readme-content').length) {
|
||||
var converter = new Showdown.converter();
|
||||
$('#readme-content').html(converter.makeHtml($('#readme-content').text()));
|
||||
}
|
||||
});
|
||||
|
||||
function paginate() {
|
||||
var $pager = $('.pager');
|
||||
$pager.find('.next a').one('click', function (e) {
|
||||
e.preventDefault();
|
||||
$(this).css('pointer-events', 'none');
|
||||
$.get(this.href, function (html) {
|
||||
$pager.after(html);
|
||||
$pager.remove();
|
||||
paginate();
|
||||
});
|
||||
});
|
||||
$pager.find('.previous').remove();
|
||||
}
|
||||
paginate();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user