您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fold the excessive long staff list
当前为
// ==UserScript== // @name Bangumi Staff Folding // @namespace https://gf.qytechs.cn/users/193469 // @description Fold the excessive long staff list // @version 1.1 // @author Rui LIU (@liurui39660) // @match https://bgm.tv/subject/* // @match https://bangumi.tv/subject/* // @icon https://icons.duckduckgo.com/ip2/bgm.tv.ico // @license MIT // @run-at document-end // ==/UserScript== (function () { 'use strict'; // If there are 12 names, the 11th and 12th will be hidden // Another typical value is 1, where only the most essential info is shown const threshold = 10; for (const li of document.querySelectorAll('#infobox > li')) { if (li.childNodes.length > threshold * 2 + 1) { // Entry name and commas const folded = document.createElement('span'); for (let i = threshold * 2 + 1; i < li.childNodes.length;) folded.append(li.removeChild(li.childNodes[i])); folded.hidden = true; li.append(folded); const button = document.createElement('a'); button.text = `\t[+${Math.ceil(folded.childNodes.length / 2)}]`; button.alt_text = '\t[<<<]'; button.href = ''; button.onclick = ev => { ev.preventDefault(); folded.hidden = !folded.hidden; [button.text, button.alt_text] = [button.alt_text, button.text]; }; li.append(button); } } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址