可道雲盤去彈窗代碼

@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