您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
detect mod change
此脚本不应直接安装,它是供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.icu/scripts/402597/801281/monitor%20dom%20change.js
// ==UserScript== // @name monitor dom change // @namespace http://www.chaochaogege.com // @version 0.1 // @description detect mod change // @author You // @grant none // ==/UserScript== !function () { window.monitordom = function (domnode, cb,config = {childList: true}) { const targetNode = domnode // Callback function to execute when mutations are observed const callback = function (mutationsList, observer) { for (let i = 0; i < mutationsList.length; i++) { cb(mutationsList[i]) } }; // Create an observer instance linked to the callback function const observer = new MutationObserver(callback); // Start observing the target node for configured mutations observer.observe(targetNode, config) } }()