Questionable Questing Userscript

removing the remaining replies and renaming the last page button

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Questionable Questing Userscript
// @description removing the remaining replies and renaming the last page button
// @match       https://forum.questionablequesting.com/*
// @license MIT 
// @version 0.0.1.20240110214931
// @namespace https://greasyfork.org/users/1230490
// ==/UserScript==

(function() {
    try {
        // Select the first element with the class 'u-dimmed' representing the 'remaining replies' section
let remainingReplies = document.querySelectorAll('.linkGroup')[1]

// Check if the 'remaining replies' section exists on the page
if (remainingReplies != null) {
    // Remove the 'remaining replies' section from the page if it's found
    remainingReplies.remove();
}
    } catch (error) {
        console.error("Error removing 'remaining replies' section:", error.message);
    }

})();

(function() {
    try {
        let navItems = document.querySelectorAll('.PageNav nav a');

navItems.forEach((item, index) => {
  if (item.textContent.includes('Next')) {
    let prevElement = navItems[index - 1];
    prevElement.textContent = 'Last';
  }
});
    } catch (error) {
        console.error("Error renaming page navigation buttons:", error.message);
    }
})();