Skip to content

Instantly share code, notes, and snippets.

@goyuix
Last active January 3, 2021 17:45
Show Gist options
  • Save goyuix/6330570 to your computer and use it in GitHub Desktop.
Save goyuix/6330570 to your computer and use it in GitHub Desktop.
javascript:(function ($) {
var pages = 20;
function getPosts(page) {
$.get("page/" + page + "/?rand=" + (new Date()).getTime(), function (d) {
$("#post-wrapper").append($(d).find("div.post-wrapper-hentry"));
if (page + 1 < pages) { getPosts(page + 1); }
});
} if (window.jQuery) { getPosts(2); } else {
var s = document.createElement('script');
s.type = "text/javascript";
s.src = "//code.jquery.com/jquery-3.5.1.min.js";
s.onload = function () { $ = window.jQuery; getPosts(2); };
document.getElementsByTagName("head")[0].appendChild(s);
}
})(window.jQuery)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment