您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Collapse all items in Strapi
当前为
// ==UserScript== // @name Strapi Collapser // @namespace https://greasyfork.org/fr/users/11667-hoax017 // @match http*://*/admin/content-manager/collectionType/* // @grant none // @version 1.1 // @author Hoax017 // @description Collapse all items in Strapi // @license MIT // ==/UserScript== var nodes let it = setInterval(_ => { let openNodes = document.querySelectorAll('[data-strapi-dropdown][transform="rotate(180deg)"]') let allNodes = document.querySelectorAll('[data-strapi-dropdown]') if (openNodes.length === allNodes.length && allNodes.length !== 0) { for (var node of [...openNodes]) { node.click() } console.info(`Collapsed ${openNodes.length} nodes`) } },1000)