Strapi Collapser

Collapse all items in Strapi

目前为 2023-10-25 提交的版本。查看 最新版本

// ==UserScript==
// @name        Strapi Collapser
// @namespace   https://gf.qytechs.cn/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)

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址