你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/461303-gm-cors,源站連結 點此以跳轉。
在开发环境通过油猴提供 CORS 跨域
当前为
本脚本为 https://greasyfork.org.cn/scripts/440890-cors-via-gm 之分支
特性:
xhr 和 fetch 两种风格 API, 适配不同需求fetchwindow.xhr 可使用 GM_xmlhttpRequest 风格请求和响应格式安装后激活:
window.addEventListener('load', () => {
const GmCors = document.querySelector('#GmCors');
if (GmCors) {
GmCors.init(window);
}
};