可道雲盤,去更新和綁定郵箱代碼彈窗(記錄)
原理是:監聽元素變化,然後執行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>版權屬於:zgcwkj
本文鏈接:https://www.zgcwkj.com/archives/273.html
轉載聲明:請注明本文章的標題及內容的出處和聲明,謝謝
評論已關閉