clean up some unused stuff and start loading content a bit earlier

This commit is contained in:
Mario Vavti 2016-02-15 22:20:55 +01:00
parent d3c779f635
commit afb86aa908

View File

@ -1231,21 +1231,8 @@ function zFormError(elm,x) {
$(window).scroll(function () { $(window).scroll(function () {
if(typeof buildCmd == 'function') { if(typeof buildCmd == 'function') {
// This is a content page with items and/or conversations // This is a content page with items and/or conversations
$('#more').hide(); if($(window).scrollTop() + $(window).height() > $(document).height() - 300) {
$('#no-more').hide();
if($(window).scrollTop() + $(window).height() > $(document).height() - 200) {
$('#more').css("top","400");
$('#more').show();
}
if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
// if($(window).scrollTop() > $(document).height() - ($(window).height() * 1.5 )) {
if((pageHasMoreContent) && (! loadingPage)) { if((pageHasMoreContent) && (! loadingPage)) {
$('#more').hide();
$('#no-more').hide();
next_page++; next_page++;
scroll_next = true; scroll_next = true;
loadingPage = true; loadingPage = true;
@ -1255,18 +1242,8 @@ $(window).scroll(function () {
} }
else { else {
// This is some other kind of page - perhaps a directory // This is some other kind of page - perhaps a directory
if($(window).scrollTop() + $(window).height() > $(document).height() - 300) {
if($(window).scrollTop() + $(window).height() > $(document).height() - 200) {
$('#more').css("top","400");
$('#more').show();
}
if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
// if($(window).scrollTop() > ($(document).height() - $(window).height() * 1.5 )) {
if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) { if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) {
$('#more').hide();
$('#no-more').hide();
next_page++; next_page++;
scroll_next = true; scroll_next = true;
loadingPage = true; loadingPage = true;