From: Thorsten S Date: Tue, 14 Jun 2022 21:58:11 +0000 (+0200) Subject: read posts per page from page X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=7817982a764c55cfd042dc264a63a65f8100b32c;p=dfde%2Fdfde-singlepage.git read posts per page from page --- diff --git a/dfde-singlepage.user.js b/dfde-singlepage.user.js index 320a688..25ed90b 100644 --- a/dfde-singlepage.user.js +++ b/dfde-singlepage.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name dfde-singlepage // @namespace de.debianforum -// @version 0.3 +// @version 0.4 // @description View all pages of a thread on one page // @author You // @match https://debianforum.de/forum/viewtopic.php*t=* @@ -34,10 +34,12 @@ if (unsuitable) { window.location.href= "https://debianforum.de/forum/viewtopic.php?" + thread_id; } let promises = [] + const postPerPage = parseInt(document.querySelector('input[name=page-number]').attributes["data-per-page"].value); + // async wrapper to fix the order of requests/posts const fn = async() => { for (var p=1; p