问答 › 查看内容
返回列表

隐藏-用户管理-删除

27 1
发表于 昨天 18:15 | 查看全部 阅读模式
隐藏-用户管理-删除

评论1

观小豪楼主Lv.1 发表于 昨天 18:16 | 查看全部
插件代码:


  1. <div>(() => {
  2.   const normalize = (text) => (text || '').replace(/\s+/g, '')

  3.   const apply = () => {
  4.     document
  5.       .querySelectorAll('#admin-user .actions button, #admin-user .actions [role="button"]')
  6.       .forEach((button) => {
  7.         if ([ '删除', 'Delete' ].includes(normalize(button.textContent))) {
  8.           button.style.setProperty('display', 'none', 'important')
  9.         }
  10.       })
  11.   }

  12.   const start = () => {
  13.     apply()
  14.     new MutationObserver(apply).observe(document.body, {
  15.       childList: true,
  16.       subtree: true,
  17.     })
  18.   }

  19.   if (document.readyState === 'loading') {
  20.     document.addEventListener('DOMContentLoaded', start, { once: true })
  21.   } else {
  22.     start()
  23.   }
  24. })()</div>
复制代码


回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

微信服务号
联系我们
电话:400-880-0750
邮箱:hello@guandata.com
Copyright © 2001-2026 观远社区 版权所有 All Rights Reserved. 浙 ICP 备15006424号-3
去回复 去发帖 返回顶部
快速回复 返回顶部 返回列表