GM_fetch

fetch pollyfill using GM_xmlhttpRequest

目前為 2021-02-07 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/421384/898554/GM_fetch.js

作者
nyarau
版本
0.0.1.20210207152600
建立日期
2021-02-07
更新日期
2021-02-07
尺寸
1.2 KB
授權條款
未知

(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