GM_fetch

fetch pollyfill using GM_xmlhttpRequest

As of 2021-02-07. See the latest version.

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/421384/898554/GM_fetch.js

Author
nyarau
Version
0.0.1.20210207152600
Created
2021-02-07
Updated
2021-02-07
Size
1.2 KB
License
N/A

(personal uses, with no guarantee what so ever)

fetch pollyfill with resp.text/resp.json/resp.blob/resp.arrayBuffer support using GM_xmlhttpRequest, not yet 100% replication of fetch API (eg. errors)

Written for / tested with TamperMonkey, may work for GeaseMonkey or others

Don't forget to add permissions

// @connect  api.example.com
// @grant    GM_xmlhttpRequest