{"_id":"@arylo-scripts/gm-polyfill","_rev":"2-98e5981dd287a4187ce992393fe334e4","name":"@arylo-scripts/gm-polyfill","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@arylo-scripts/gm-polyfill","version":"1.0.0","keywords":["userscript","tampermonkey","greasemonkey","gm","typescript"],"author":{"name":"Arylo Yeung","email":"arylo.open@gmail.com"},"license":"MIT","_id":"@arylo-scripts/gm-polyfill@1.0.0","maintainers":[{"name":"arylo","email":"arylo.open+npm@gmail.com"}],"homepage":"https://github.com/arylo-scripts/gm-polyfill#readme","bugs":{"url":"https://github.com/arylo-scripts/gm-polyfill/issues"},"dist":{"shasum":"705a5cd4c39374595df1066b58e30416e90b36f0","tarball":"https://registry.npmjs.org/@arylo-scripts/gm-polyfill/-/gm-polyfill-1.0.0.tgz","fileCount":35,"integrity":"sha512-/67wW2tIrRW/YpYQbDF1Z/VkBGSUSw+4EPMz5GD9S3zS3dnaKxvleS7OsECOGAx6tkwVv7uBq/FTyORG536LLQ==","signatures":[{"sig":"MEYCIQDBWAKpBBzNXENGHgrJTfG6F22nQBMuF7kFPM7EcgGnjAIhAM2AxOdZMS+jp6+39+Sp9Us1m8dZLVNXwoEhikcx/yAX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arylo-scripts%2fgm-polyfill@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":18347},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":"24.12.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"22455d5bb044d60d126cd334ab8755f4b0c7d7a7","scripts":{"lint":"concurrently -m 1 --timings npm:lint:*","build":"tsc -p tsconfig.json","clean":"rimraf dist","prepare":"npm run build","lint:oxlint":"oxlint","fix:formatter":"oxfmt","lint:formatter":"oxfmt --check","lint:type-check":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"arylo","email":"arylo.open+npm@gmail.com"},"repository":{"url":"git+https://github.com/arylo-scripts/gm-polyfill.git","type":"git"},"_npmVersion":"11.6.2","description":"A small typed polyfill layer for common userscript APIs.","directories":{},"_nodeVersion":"24.12.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"packageManager":"npm@11.6.2","devDependencies":{"oxfmt":"^0.35.0","oxlint":"^1.58.0","rimraf":"^6.1.3","typescript":"~5.9.3","concurrently":"^8.2.2","@arylo-scripts/tsconfig":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gm-polyfill_1.0.0_1789205797974_0.8495633026220997","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@arylo-scripts/gm-polyfill","version":"1.1.0","description":"A small typed polyfill layer for common userscript APIs.","keywords":["userscript","tampermonkey","greasemonkey","gm","typescript"],"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js","default":"./dist/index.mjs"}},"scripts":{"build":"concurrently -m 1 --timings npm:build:*","build:cjs":"tsdown src/index.ts --format cjs --out-dir dist --no-clean --platform neutral --target es2018 --sourcemap --dts","build:esm":"tsdown src/index.ts --format esm --out-dir dist --no-clean --platform neutral --target es2018 --sourcemap --no-dts","clean":"rimraf dist","lint":"concurrently -m 1 --timings npm:lint:*","lint:type-check":"tsc -p tsconfig.json --noEmit","lint:formatter":"oxfmt --check","lint:oxlint":"oxlint","fix:formatter":"oxfmt","prepare":"npm run build"},"devDependencies":{"@arylo-scripts/tsconfig":"^1.0.0","concurrently":"^8.2.2","oxfmt":"^0.35.0","oxlint":"^1.58.0","rimraf":"^6.1.3","tsdown":"^0.23.0","typescript":"~5.9.3"},"engines":{"node":"24.12.0"},"packageManager":"npm@11.6.2","repository":{"type":"git","url":"git+https://github.com/arylo-scripts/gm-polyfill.git"},"homepage":"https://github.com/arylo-scripts/gm-polyfill#readme","bugs":{"url":"https://github.com/arylo-scripts/gm-polyfill/issues"},"author":{"name":"Arylo Yeung","email":"arylo.open@gmail.com"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"license":"MIT","gitHead":"a85e0aa9a29220484300540118093b7d0353e766","_id":"@arylo-scripts/gm-polyfill@1.1.0","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-tyRlTagUfd3d/LGBlC0/O1Xj8m7ioxbxcQe+usRhgVz9u+LGDW/hnE0Vb+F5t0b4+nfNXTk7MGQu9fdXdVf1Pw==","shasum":"a0f7e837e2686e00a8f980e35c383d646a5a356a","tarball":"https://registry.npmjs.org/@arylo-scripts/gm-polyfill/-/gm-polyfill-1.1.0.tgz","fileCount":9,"unpackedSize":23224,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arylo-scripts%2fgm-polyfill@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH9MoKeBIES8KvtVJ5PqtxKtBZee5pcrXcj6Qk8mgA8IAiAtijrLb/f6Dywlz9pX9gvfc3+LqM1UI8+YcbK+WRc0uQ=="}]},"_npmUser":{"name":"arylo","email":"arylo.open+npm@gmail.com"},"directories":{},"maintainers":[{"name":"arylo","email":"arylo.open+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gm-polyfill_1.1.0_1789403924596_0.2419767158127828"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-12T09:36:37.763Z","modified":"2026-09-14T16:38:45.115Z","1.0.0":"2026-09-12T09:36:38.116Z","1.1.0":"2026-09-14T16:38:44.763Z"},"bugs":{"url":"https://github.com/arylo-scripts/gm-polyfill/issues"},"author":{"name":"Arylo Yeung","email":"arylo.open@gmail.com"},"license":"MIT","homepage":"https://github.com/arylo-scripts/gm-polyfill#readme","keywords":["userscript","tampermonkey","greasemonkey","gm","typescript"],"repository":{"type":"git","url":"git+https://github.com/arylo-scripts/gm-polyfill.git"},"description":"A small typed polyfill layer for common userscript APIs.","maintainers":[{"name":"arylo","email":"arylo.open+npm@gmail.com"}],"readme":"# gm-polyfill\n\nTyped wrappers and fallbacks for common userscript APIs.\n\n## Install\n\n```sh\nnpm install @arylo-scripts/gm-polyfill\n```\n\n## Usage\n\n```ts\nimport {\n  GM_addStyle,\n  GM_getValue,\n  GM_setValue,\n  GM_xmlhttpRequestAsync,\n} from '@arylo-scripts/gm-polyfill'\n\nGM_addStyle('body { color: red; }')\n\nconst theme = GM_getValue('theme', 'light')\nGM_setValue('theme', 'dark')\n\nconst response = await GM_xmlhttpRequestAsync({\n  method: 'GET',\n  url: 'https://example.com/api',\n})\n```\n\n`GM_addStyle` falls back to inserting a `<style>` element when the userscript\nruntime does not provide `window.GM_addStyle`.\n\n## API\n\n- `GM_addStyle(cssContent)`\n- `GM_getResourceText(name)`\n- `GM_getValue(key, defaultValue)`\n- `GM_setClipboard(content, type, callback)`\n- `GM_setValue(key, value)`\n- `GM_xmlhttpRequest(details)`\n- `GM_xmlhttpRequestAsync(details)`\n\n## Development\n\n```sh\nnpm install\nnpm run lint\nnpm run build\n```\n","readmeFilename":"README.md"}