gmxhr-fetch

A fetch-like polyfill for userscript managers.(TM,GM,VM)

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://greasyfork.org/scripts/372917-gmxhr-fetch/code/gmxhr-fetch.js?version=639024

Advertisement
Author
3142 maple
Ratings
0 0 0
Version
0.0.1.20181022191154
Created
Updated
License
N/A
Applies to
All sites

Author's Description

gmxhr-fetch

A fetch-like polyfill for userscript managers.(TM,GM,VM)

To use

Add the following content into your script's metablock.

// @require https://unpkg.com/gmxhr-fetch
// @grant   GM_xmlhttpRequest
// @grant   GM.xmlHttpRequest

Then you can call gmfetch anywhere in the script just like fetch.

gmfetch('https://example.com').then(console.log)