可道云盘,去更新和绑定邮箱代码弹窗(记录)
原理是:监听元素变化,然后执行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://zgcwkj.cn/archives/273.html
转载声明:请注明本文章的标题及内容的出处和声明,谢谢