XHR请求拦截工具类
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/494576/1377969/XHR_INTERCEPTOR.js
// @run-at document-start
const xhrInterceptor = new XMRInterceptor();
xhrInterceptor.addUrlInterceptor({
domain: "baidu.com",
url: "/search?a=1",
cb: (response) => {
console.log('====> ok', response);
},
});
xhrInterceptor.execute();