GMPolyfill: add header prop (#543)

This commit is contained in:
Cloudburst 2023-02-28 23:13:49 +01:00 committed by GitHub
parent f56d99e133
commit c91b0df607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -92,6 +92,7 @@ function GM_fetch(url, opt) {
resp.arrayBuffer = () => blobTo("arrayBuffer", blob);
resp.text = () => blobTo("text", blob);
resp.json = async () => JSON.parse(await blobTo("text", blob));
resp.headers = new Headers(parseHeaders(resp.responseHeaders));
resolve(resp);
};
options.ontimeout = () => reject("fetch timeout");

View File

@ -201,5 +201,9 @@ export const Devs = /* #__PURE__*/ Object.freeze({
lewisakura: {
name: "lewisakura",
id: 96269247411400704n
},
cloudburst: {
name: "cloudburst",
id: 892128204150685769n
}
});