Greasy Fork is available in English.

gmxhr-fetch

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

此脚本不应被直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.org/scripts/372917/639024/gmxhr-fetch.js

脚本作者
maple3142
版本
0.0.1.20181022191154
创建日期
2018-10-06
最近更新
2018-10-22
许可证
暂无

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)