GM XHR

jQuery AJAX wrapper for GM_xmlhttpRequest

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/401399/938754/GM%20XHR.js

Author
RobotOilInc
Version
1.1
Created
2020-04-19
Updated
2021-06-08
License
N/A

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: