您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically clicks the "xxx hidden items" button on Github issue pages to successively load in all the comments in the page on load.
- // ==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)});
- })();