{"id":21171526,"url":"https://github.com/vaaski/userscript-template","last_synced_at":"2025-03-14T17:40:20.302Z","repository":{"id":243897630,"uuid":"813655923","full_name":"vaaski/userscript-template","owner":"vaaski","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-11T15:35:38.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T22:23:40.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaaski.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-11T13:46:18.000Z","updated_at":"2024-08-11T15:35:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f3bdea6-51f0-41e2-8c6b-c4e4af3dcca0","html_url":"https://github.com/vaaski/userscript-template","commit_stats":null,"previous_names":["vaaski/userscript-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaski%2Fuserscript-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaski%2Fuserscript-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaski%2Fuserscript-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaski%2Fuserscript-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaaski","download_url":"https://codeload.github.com/vaaski/userscript-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243622418,"owners_count":20320971,"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":[],"created_at":"2024-11-20T16:06:56.992Z","updated_at":"2025-03-14T17:40:20.258Z","avatar_url":"https://github.com/vaaski.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\u003cimg src=\"https://www.google.com/s2/favicons?sz=64\u0026domain=google.com\" /\u003e Userscript Template\u003c/h1\u003e\n\n\u003e A template for creating userscripts with TypeScript.\n\n## Installing\n\n- Install Bun and Node\n- Install [Violentmonkey](https://violentmonkey.github.io/get-it).\n- Install the dependencies: `bun i`\n- Run `bun run build` to transpile and bundle the script\n- Drag the `dist/index.user.js` file into your browser and click install.\n\n## About this template\n\n- The metadata for the script is completely defined in [`package.json`](package.json).\n  - Relevant keys in [`esbuild.ts#L6`](esbuild.ts#L6).\n- CSS injection is manual, they'll be imported as a string.\n  - There is a `styleInject` function in [`src/util.ts`](src/util.ts) that takes a CSS string and injects a `\u003cstyle\u003e` tag with the given name as the ID.\n  - This is to avoid a duplicate styleInject function definition by esbuild and to provide more manual control.\n- The `dev` script will watch for changes and rebuild the script.\n- The bundle config is in [`esbuild.ts`](esbuild.ts).\n- Build-time variables are declared in [`esbuild.ts#L19`](esbuild.ts#L19) at `esbuildConfig.define` and typed in [`types/window.d.ts`](types/window.d.ts).\n- Linting is done with [Biome](https://biomejs.dev).\n- Formatting is done with [Prettier](https://prettier.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaaski%2Fuserscript-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaaski%2Fuserscript-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaaski%2Fuserscript-template/lists"}