Greasy Fork is available in English.

XHR_INTERCEPTOR

XHR请求拦截工具类

Этот скрипт недоступен для установки пользователем. Он является библиотекой, которая подключается к другим скриптам мета-ключом // @require https://update.greasyfork.org/scripts/494576/1377969/XHR_INTERCEPTOR.js

Автор
Zosah
Версия
1.0.0
Создан
10.05.2024
Обновлён
17.05.2024
Лицензия
Недоступно

使用

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