From 7817982a764c55cfd042dc264a63a65f8100b32c Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Tue, 14 Jun 2022 23:58:11 +0200 Subject: [PATCH] read posts per page from page --- dfde-singlepage.user.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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