XHR_INTERCEPTOR

XHR请求拦截工具类

이 스크립트는 직접 설치하는 용도가 아닙니다. 다른 스크립트에서 메타 지시문 // @require https://update.greasyforks.org/scripts/494576/1377969/XHR_INTERCEPTOR.js을(를) 사용하여 포함하는 라이브러리입니다.

작성자
Zosah
버전
1.0.0
생성일
2024-05-10
갱신일
2024-05-17
크기
2.05KB
라이선스
해당 없음

使用

// @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();
长期地址
遇到问题?请前往 GitHub 提 Issues。