Greasy Fork is available in English.

GM XHR

jQuery AJAX wrapper for GM_xmlhttpRequest

Dette script bør ikke installeres direkte. Det er et bibliotek, som andre scripts kan inkludere med metadirektivet // @require https://update.greasyfork.org/scripts/401399/938754/GM%20XHR.js

Skaber
RobotOilInc
Version
1.1
Oprettet
19.04.2020
Opdateret
08.06.2021
Size
2,75 kB
Licens
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: