GM XHR

jQuery AJAX wrapper for GM_xmlhttpRequest

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.cn-greasyfork.org/scripts/401399/938754/GM%20XHR.js

作者
RobotOilInc
版本
1.1
创建于
2020-04-19
更新于
2021-06-08
大小
2.8 KB
许可证
暂无

Allows you to use GM_xmlhttpRequest for $.ajax instead of the default XHR. This means that you can do CORS requests, as long as @connect is set properly.


How to use:

// Setup GM_XHR
$.ajaxSetup({ xhr: function() {return new GM_XHR; } });

Contributions

Original version: