您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
This script is for the YCS Chrome add on. It will spamclick the loadmore button to always load all entries. This makes it work well with my other script
// ==UserScript== // @name YouTube YCS Load all Items // @namespace juliSharowYouTubeYCSLoadAllItems // @description This script is for the YCS Chrome add on. It will spamclick the loadmore button to always load all entries. This makes it work well with my other script // @version 1.0.0 // @match https://www.youtube.com/* // @run-at document-idle // @license MIT // ==/UserScript== const debug = false; const buttonId = "ycs__show-more-button"; (async function (_undefined) { if (debug) console.debug("YouTube YCS Load all Items"); async function loadAllItems() { let button = document.querySelector(`#${buttonId}`); if (!button) { if (debug) console.debug("button doesnt exist"); return; } if (button.isUsed) { if (debug) console.debug("button is Used"); return; } button.isUsed = true; while (document.querySelector(`#${buttonId}`)) { button.click(); await new Promise((r) => setTimeout(r, 100)); if (debug) console.debug("click", button); } if (debug) console.debug("finished Clicking"); button.isUsed = false; } window.addEventListener("click", loadAllItems); })();