{"id":17109954,"url":"https://github.com/oe/webpack-userscript-template","last_synced_at":"2026-05-10T05:04:04.622Z","repository":{"id":151076487,"uuid":"302958289","full_name":"oe/webpack-userscript-template","owner":"oe","description":"create your own userscript with modern technology powered by webpack ","archived":false,"fork":false,"pushed_at":"2021-09-24T10:07:25.000Z","size":111,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T11:59:24.813Z","etag":null,"topics":["es6","template","typescript","userscript","webpack"],"latest_commit_sha":null,"homepage":"","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/oe.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-10-10T17:47:11.000Z","updated_at":"2023-05-30T04:33:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb06106a-5ca5-420b-8497-34278a80b84b","html_url":"https://github.com/oe/webpack-userscript-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/oe/webpack-userscript-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fwebpack-userscript-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fwebpack-userscript-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fwebpack-userscript-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fwebpack-userscript-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oe","download_url":"https://codeload.github.com/oe/webpack-userscript-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fwebpack-userscript-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265791724,"owners_count":23829165,"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":["es6","template","typescript","userscript","webpack"],"created_at":"2024-10-14T16:24:56.335Z","updated_at":"2026-05-10T05:03:59.578Z","avatar_url":"https://github.com/oe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack userscript template\n![code with typescript](https://badges.frapsoft.com/typescript/code/typescript.svg?v=101)\n\nUserscript developed with modern tech powered by webpack\n\n\u003e This template is based on [Webpack](https://github.com/webpack/webpack) and [webpack-userscript](https://github.com/momocow/webpack-userscript#readme), written in typescript.\n\n## Usage\n\nI recommend you using [Chrome](https://www.google.com/chrome/) and [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) to develop a user script. Following steps are based on these two tools.\n\n### Prepare materials\n1. create your own repo by click the green button [Use this template](https://github.com/oe/webpack-userscript-template/generate)\n2. install a user script manager for your browser,  [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) is recommended for Chrome, for more alternatives just check [greasyfork](https://greasyfork.org/en#home-step-1)\n \n\n### Configure you browser: Chrome\n\n1. enable insecure localhost: navigate to `chrome://flags/#allow-insecure-localhost`, enable insecure localhost\n2. enable file url access of extensions: navigate to `chrome://extensions/?id=dhdgffkkebhmkfjojejmpbldmpobfkfo`(Chrome manage extensions page of `Tampermonkey`) and enable `Allow access to file URLs` (you need to manual reload page when dev userscript, see [#475](https://github.com/Tampermonkey/tampermonkey/issues/475#issuecomment-348594785) for more detail)\n\n### Dev\n1. install dependencies by run `yarn` (or `npm i`)\n2. open dev server by run `yarn dev` (or `npm run dev`)\n3. \u003chttps://127.0.0.1/[your userscript name].proxy.user.js\u003e will be open automatically in browser(click  `Advanced` -\u003e `proceed` if it shows a security warning) to install the proxy script. by setting `openScriptInstallPage` to `false` in `userscript.config.ts` you can turn off this behavior.\n4. open your target webpage to see the effect. by setting `openTargetPage` to as your target url in `userscript.config.ts` it will open that page automatically for you.\n5. config userscript by modifying `userscript.config.ts`, you need to rerun `yarn dev` to make it take effect\n6. config webpack by modifying `webpack.config.ts`, you need to rerun `yarn dev` to make it take effect\n7. reload your target webpage after userscript changed\n\n## Build\nrun cmd `yarn build`(or `npm run build`), your userscript should be in `dist` folder with extension `.user.js`\n\n## Publish\nafter your script fully tested, you can build it than publish it to the world. here are some platform your can share your script:  \n* [greasyfork](https://greasyfork.org/)\n* [openuserjs](https://openuserjs.org/)\n\nnotice: userscript name(which can be configured via `scriptHeaders.name` in `webpack.config.ts`) is a script's identity, you should not change it's name after published.\n\n## References\n1. [userscript docs(from Tampermonkey)](https://www.tampermonkey.net/documentation.php)\n2. [Webpack-userscript](https://github.com/momocow/webpack-userscript#readme)\n3. [Webpack](https://webpack.js.org/configuration/)\n4. [Typescript](https://www.typescriptlang.org/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foe%2Fwebpack-userscript-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foe%2Fwebpack-userscript-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foe%2Fwebpack-userscript-template/lists"}