Last active
January 3, 2021 17:45
-
-
Save goyuix/6330570 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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