Move to local jQuery

This commit is contained in:
John O'Nolan 2020-06-19 01:12:04 +07:00
parent 19e2fa3328
commit 6a21900933
8 changed files with 10 additions and 5 deletions

View File

@ -1,2 +1,2 @@
$(function(n){var i=1,t=window.location.pathname,o=n(document),r=n(".post-feed"),a=300,s=!1,c=!1,l=window.scrollY,w=window.innerHeight,d=o.height();function u(){l=window.scrollY,e()}function v(){w=window.innerHeight,d=o.height(),e()}function e(){s||requestAnimationFrame(f),s=!0}function f(){if(t=function(e){var n=/(?:page\/)(\d)(?:\/)$/i;return(e=e.replace(/#(.*)$/g,"").replace("////g","/")).match(n)&&(i=parseInt(e.match(n)[1]),e=e.replace(n,"")),e}(t),!c)if(l+w<=d-a)s=!1;else{if(i>=maxPages)return window.removeEventListener("scroll",u,{passive:!0}),void window.removeEventListener("resize",v);c=!0;var e=t+"page/"+(i+=1)+"/";n.get(e,function(e){var n=document.createRange().createContextualFragment(e).querySelectorAll(".post");n.length&&[].forEach.call(n,function(e){r[0].appendChild(e)})}).fail(function(e){404===e.status&&(window.removeEventListener("scroll",u,{passive:!0}),window.removeEventListener("resize",v))}).always(function(){d=o.height(),s=c=!1})}}window.addEventListener("scroll",u,{passive:!0}),window.addEventListener("resize",v),f()});
$(function(t){var o=1,r=window.location.pathname,a=t(document),s=t(".post-feed"),c=300,l=!1,w=!1,d=window.scrollY,v=window.innerHeight,u=a.height();function f(){d=window.scrollY,e()}function g(){v=window.innerHeight,u=a.height(),e()}function e(){l||requestAnimationFrame(n),l=!0}function n(){var e,n;if(n=/(?:page\/)(\d)(?:\/)$/i,(e=(e=r).replace(/#(.*)$/g,"").replace("////g","/")).match(n)&&(o=parseInt(e.match(n)[1]),e=e.replace(n,"")),r=e,!w)if(d+v<=u-c)l=!1;else{if(o>=maxPages)return window.removeEventListener("scroll",f,{passive:!0}),void window.removeEventListener("resize",g);w=!0;var i=r+"page/"+(o+=1)+"/";t.get(i,function(e){var n=document.createRange().createContextualFragment(e).querySelectorAll(".post");n.length&&[].forEach.call(n,function(e){s[0].appendChild(e)})}).fail(function(e){404===e.status&&(window.removeEventListener("scroll",f,{passive:!0}),window.removeEventListener("resize",g))}).always(function(){u=a.height(),l=w=!1})}}window.addEventListener("scroll",f,{passive:!0}),window.addEventListener("resize",g),n()});
//# sourceMappingURL=infinitescroll.js.map

File diff suppressed because one or more lines are too long

2
assets/built/jquery-3.4.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
assets/js/jquery-3.4.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -72,7 +72,7 @@
{{!-- <foot> --}}
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="{{asset "built/jquery-3.4.1.min.js"}}"></script>
{{#if pagination.pages}}
<script>