Greasy Fork is available in English.

XHR_INTERCEPTOR

XHR请求拦截工具类

このスクリプトは単体で利用できません。右のようなメタデータを含むスクリプトから、ライブラリとして読み込まれます: // @require https://update.greasyfork.org/scripts/494576/1377969/XHR_INTERCEPTOR.js

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
作者
Zosah
バージョン
1.0.0
作成日
2024/05/10
更新日
2024/05/17
ライセンス
不明

使用

// @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();