Show all comments on github issue

Automatically clicks the "xxx hidden items" button on Github issue pages to successively load in all the comments in the page on load.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Show all comments on github issue
// @namespace    https://www.taylrr.co.uk
// @version      0.1
// @description  Automatically clicks the "xxx hidden items" button on Github issue pages to successively load in all the comments in the page on load.
// @author       taylor8294
// @match        https://github.com/*/issues/*
// @icon         https://icons.duckduckgo.com/ip2/github.com.ico
// @grant        none
// @license      GPLv3
// ==/UserScript==

(function() {
    'use strict';

    function ready(fn) {
        if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
            fn();
        } else {
            document.addEventListener('DOMContentLoaded', fn);
        }
    }

    function clickButton(){
        let button = document.querySelector('.ajax-pagination-form button');
        if(button){
            if(!button.disabled) button.click();
            setTimeout(clickButton,50);
        } else console.log('All comments are now showing.')
    }
    ready(()=>{setTimeout(clickButton,2000)});
})();