gmxhr-fetch

fetch-like wrapper for GM_xmlhttpRequest.

Usage no npm install needed!

<script type="module">
  import gmxhrFetch from 'https://cdn.skypack.dev/gmxhr-fetch';
</script>

README

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)