Greasy Fork is available in English.

XHR_INTERCEPTOR

XHR请求拦截工具类

Skrip ini tidak untuk dipasang secara langsung. Ini adalah pustaka skrip lain untuk disertakan dengan direktif meta // @require https://update.greasyfork.org/scripts/494576/1377969/XHR_INTERCEPTOR.js

Penulis
Zosah
Versi
1.0.0
Dibuat
10 Mei 2024
Diperbarui
17 Mei 2024
Lisensi
N/A

使用

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