// page= is used in drupal too but second page is page=1 not page=2:
// thx Jerod Fritz, vladikoff
if(path.match(/^(.*?page=)1(\/.*|$)/)){
path=path.match(/^(.*?page=)1(\/.*|$)/).slice(1);
returnpath;
}else{
debug('Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.');
props.isInvalidPage=true;//prevent it from running on this page.
}
}
debug('determinePath',path);
returnpath;
}
// Calculate internal height (used for local scroll)
functionhiddenHeight(element){
varheight=0;
$(element).children().each(function(){
height=height+$(this).outerHeight(false);
});
returnheight;
}
//Generate InstanceID based on random data (to give consistent but different ID's)