{"id":14988922,"url":"https://github.com/sec-ant/gm-fetch","last_synced_at":"2025-04-12T00:33:35.224Z","repository":{"id":185493410,"uuid":"673639522","full_name":"Sec-ant/gm-fetch","owner":"Sec-ant","description":"A fetch API for GM_xmlhttpRequest.","archived":false,"fork":false,"pushed_at":"2024-09-23T22:06:32.000Z","size":760,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T20:15:32.477Z","etag":null,"topics":["fetch","gm-fetch","gm-xmlhttprequest","greasemonkey","tampermonkey","userscript","violentmonkey"],"latest_commit_sha":null,"homepage":"https://fastly.jsdelivr.net/npm/@sec-ant/gm-fetch@latest/dist/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sec-ant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-02T05:03:34.000Z","updated_at":"2025-02-18T09:10:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"22d891fb-5112-41aa-a84f-a137e7dabb1f","html_url":"https://github.com/Sec-ant/gm-fetch","commit_stats":null,"previous_names":["sec-ant/gm-fetch"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fgm-fetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fgm-fetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fgm-fetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fgm-fetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sec-ant","download_url":"https://codeload.github.com/Sec-ant/gm-fetch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501661,"owners_count":21114676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fetch","gm-fetch","gm-xmlhttprequest","greasemonkey","tampermonkey","userscript","violentmonkey"],"created_at":"2024-09-24T14:17:25.854Z","updated_at":"2025-04-12T00:33:35.191Z","avatar_url":"https://github.com/Sec-ant.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @sec-ant/gm-fetch\n\nA fetch API for `GM_xmlhttpRequest` / `GM.xmlHttpRequest`.\n\n## Features\n\n- Use `responseType: stream` to prevent buffering large data when possible.\n- Use Typescript.\n- Provides es module, iife script and lib mode userscript as well.\n\n## Install\n\nIf you use [vite-plugin-monkey](https://github.com/lisonge/vite-plugin-monkey):\n\n```bash\nnpm i @sec-ant/gm-fetch\n```\n\nor just plain userscript (change `latest` to the version number as needed):\n\n```js\n// @require   https://cdn.jsdelivr.net/npm/@sec-ant/gm-fetch@latest/dist/index.iife.js\n```\n\n## Usage\n\n1.  Grant necessary GM_APIs:\n\n    vite-plugin-monkey:\n\n    ```ts\n    {\n      plugins: [\n        monkey({\n          userscript: {\n            // or GM.xmlHttpRequest\n            grant: \"GM_xmlhttpRequest\",\n            // whatever websites you're to make requests to\n            connect: [\"github.com\"],\n          },\n        }),\n      ];\n    }\n    ```\n\n    plain userscript:\n\n    ```js\n    // @grant     GM_xmlhttpRequest\n    // @connect   github.com\n    ```\n\n2.  Use it just like fetch:\n\n    vite-plugin-monkey:\n\n    ```ts\n    import gmFetch from \"@sec-ant/gm-fetch\";\n\n    gmFetch(\"https://github.com/Sec-ant/gm-fetch\");\n    ```\n\n    plain userscript:\n\n    ```js\n    /* globals gmFetch */\n    (function () {\n      \"use strict\";\n      gmFetch(\"https://github.com/Sec-ant/gm-fetch\");\n    })();\n    ```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsec-ant%2Fgm-fetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsec-ant%2Fgm-fetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsec-ant%2Fgm-fetch/lists"}