-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
1 lines (1 loc) · 1.09 KB
/
Copy pathscript.js
File metadata and controls
1 lines (1 loc) · 1.09 KB
1
!function(){var a=new DOMParser,e=1;function d(e){document.getElementById("loadButton").style.display=e}function i(){if(3<=e)d("none");else{var o=document.createElement("div");document.getElementById("posts").appendChild(o),!function(t,e,n){e=e||function(){},n=n||function(e){console.warn("resource "+t+" failed to load with a status of "+e.status)};var o=XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");o.onreadystatechange=function(){4==o.readyState&&(200==o.status||0==o.status?e(o):n(o))},o.open("GET",t,!0),o.send()}("/paginates/paginate${i}.html".replace("${i}",e++),function(e){for(var t=a.parseFromString(e.responseText,"text/html");0!==t.body.childNodes.length;){var n=t.body.childNodes[0];t.body.removeChild(n),o.appendChild(n)}}),3<=e&&d("none")}}document.addEventListener("DOMContentLoaded",function(){for(var e,t=document.getElementsByTagName("meta"),n=0;n<t.length;n++)"isStandalonePaginate"===(e=t[n]).name&&"true"===e.content&&(window.location.href="/index.html");var o=document.getElementById("loadButton");null!==o&&o.addEventListener("click",i),null!==o&&d("flex")})}();