可道云盘去弹窗代码

@zgcwkj  2026年03月17日

分类:

代码 网站 

可道云盘,去更新和绑定邮箱代码弹窗(记录

原理是:监听元素变化,然后执行js脚本
  • 步骤:后台管理 > 系统设置 > 基础设置 > 其它设置 > 统计代码 HTML
<script>
  // 统一延迟时间
  const DELAY = 1000
  // 执行操作
  function executeTargetActions () {
    setTimeout(() => {
      // 关闭通知
      try { document.querySelector('.kui-notify-close')?.click() } catch {}
      // 修改标题
      try { document.title = document.title.replace(' - Powered by kodbox', '') } catch {}
      // 点击版本忽略
      try { document.querySelector('.ver_tips.ignore')?.click() } catch {}
    }, DELAY)
  }
  // 页面加载完成时
  window.addEventListener('load', () => executeTargetActions())
  // 监控body变化
  const observer = new MutationObserver(() => executeTargetActions())
  // 启动监听
  observer.observe(document.body, { childList: true, subtree: true })
</script>


添加新评论

Top