myButton_a.innerText = "∞";
myButton.appendChild(myButton_a)
- document.querySelector(".pagination ul").prepend(myButton);
+ const pagination = document.querySelector(".pagination ul");
+ if (pagination) {
+ pagination.prepend(myButton);
+ }
function clickit() {
if (unsuitable) { window.location.href= "https://debianforum.de/forum/viewtopic.php?" + thread_id; }
let promises = []
- const pageForm = document.querySelector('input[name=page-number]');
- const postPerPage = pageForm ? parseInt(pageForm.attributes["data-per-page"].value) : 25;
+ 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() => {