自动加载update
This commit is contained in:
parent
7918e830a2
commit
31242004c5
|
@ -1432,22 +1432,21 @@ var home = location.href,
|
||||||
XLS: function () {
|
XLS: function () {
|
||||||
$body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body');
|
$body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body');
|
||||||
var load_post_timer;
|
var load_post_timer;
|
||||||
$(window).scroll(function () {
|
var intersectionObserver = new IntersectionObserver(function (entries) {
|
||||||
var htmlHeight=document.body.scrollHeight;
|
if (entries[0].intersectionRatio <= 0) return;
|
||||||
var clientHeight=$(this).height() + 1;
|
var page_next = $('#pagination a').attr("href");
|
||||||
var scrollTop=document.documentElement.scrollTop;
|
var load_key = document.getElementById("add_post_time");
|
||||||
var page_next = $('#pagination a').attr("href");
|
if(page_next!=undefined && load_key ){
|
||||||
var load_key = document.getElementById("add_post_time");
|
var load_time = document.getElementById("add_post_time").title;
|
||||||
if(scrollTop+clientHeight > htmlHeight){
|
if(load_time !="233"){
|
||||||
if(page_next!=undefined && load_key ){
|
console.log("%c 自动加载时倒计时 %c","background:#9a9da2; color:#ffffff; border-radius:4px;","","",load_time);
|
||||||
var load_time = document.getElementById("add_post_time").title;
|
load_post_timer=setTimeout(function(){load_post();},load_time*1000);
|
||||||
if(load_time !="233"){
|
}
|
||||||
console.log("%c 自动加载时倒计时 %c","background:#9a9da2; color:#ffffff; border-radius:4px;","","",load_time);
|
|
||||||
load_post_timer=setTimeout(function(){load_post();},load_time*1000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
intersectionObserver.observe(
|
||||||
|
document.querySelector('.footer-device')
|
||||||
|
);
|
||||||
$('body').on('click', '#pagination a', function () {
|
$('body').on('click', '#pagination a', function () {
|
||||||
clearTimeout(load_post_timer);
|
clearTimeout(load_post_timer);
|
||||||
load_post();
|
load_post();
|
||||||
|
|
Loading…
Reference in New Issue