您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
侦听节点变化
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/479253/1276618/%E4%BE%A6%E5%90%AC%E7%BD%91%E9%A1%B5%E8%8A%82%E7%82%B9%E5%8F%98%E5%8C%96.js
// ==UserScript== // @name 侦听网页节点变化 // @namespace https://leochan.me // @version 1.0.0 // @description 侦听节点变化 // @author Leo // @match *://* // @icon https://www.google.com/s2/favicons?sz=64&domain=leochan.me // @homepage https://leochan.me // @licesen GPLv2 // @grant none // ==/UserScript== function leoChanWatchTargetElement(selector, cb){ const targetElement = document.querySelector(selector); if(!targetElement){ return; } const config = { attributes: true, childList: true, subtree: true }; const observer = new MutationObserver(cb); observer.observe(targetElement, config); return observer; }