gmfetch

A shim for using GM.xmlHttpRequest with a fetch-like API.

当前为 2021-02-22 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.org/scripts/422172/903521/gmfetch.js

作者
PotatoDiet
版本
1.0
创建于
2021-02-22
更新于
2021-02-22
大小
760 字节
许可证
GPL-3.0

Usage

Metablock

@require https://greasyfork.org/scripts/422172-gmfetch/code/gmfetch.js
@grant   GM.xmlHttpRequest

Code

(async () => {
  // https://developer.mozilla.org/en-US/docs/Web/API/Response
  const res = await gmfetch("https://google.com");
  console.log(await res.text());
})();