{"id":51175449,"url":"https://github.com/ranjbar-dev/customize-website","last_synced_at":"2026-06-27T03:30:31.203Z","repository":{"id":367084189,"uuid":"1278978232","full_name":"ranjbar-dev/customize-website","owner":"ranjbar-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-24T12:44:18.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-24T14:22:14.312Z","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/ranjbar-dev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-24T09:04:10.000Z","updated_at":"2026-06-24T12:44:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ranjbar-dev/customize-website","commit_stats":null,"previous_names":["ranjbar-dev/customize-website"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ranjbar-dev/customize-website","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fcustomize-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fcustomize-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fcustomize-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fcustomize-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranjbar-dev","download_url":"https://codeload.github.com/ranjbar-dev/customize-website/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fcustomize-website/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34840899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-06-27T03:30:30.511Z","updated_at":"2026-06-27T03:30:31.198Z","avatar_url":"https://github.com/ranjbar-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Site Customizer\n\nA personal Manifest V3 Chrome extension that injects your own **CSS** and **JavaScript**\ninto websites by URL glob. JS runs in the page's **MAIN world** via `chrome.userScripts`,\nso it can read the site's own globals and bypasses page CSP (works on `google.com`).\nCSS is appended as a `\u003cstyle\u003e` at the end of `\u003chead\u003e`, so it overrides the site's styles.\n\nRules live in `chrome.storage.local`; the service worker is the single source of truth and\nre-registers all userScripts whenever a rule changes.\n\n## Build\n\n```bash\nnpm install\nnpm run build      # -\u003e dist/   (tsc typecheck + vite build)\nnpm run dev        # HMR dev build, also writes dist/\nnpm test           # unit tests (validation, URL matching, import/export)\n```\n\n## Install (unpacked)\n\n1. `npm run build`\n2. Open `chrome://extensions`\n3. Turn on **Developer mode** (top-right)\n4. Click **Load unpacked** → select the **`dist/`** folder\n\n## Enable \"Allow user scripts\" (required)\n\n`chrome.userScripts` is gated behind a per-extension switch. Until it's on, injection\nsilently does nothing and the popup/options show a banner.\n\n1. `chrome://extensions` → **Site Customizer** → **Details**\n2. Turn on **Allow user scripts**\n3. Reload any tab you want customized\n\n\u003e If you don't see the toggle, make sure **Developer mode** is on.\n\n## Use\n\n- **Popup** (toolbar icon): lists rules matching the current tab with quick enable/disable,\n  plus **Create rule for this site** (prefills `*://\u003chost\u003e/*`).\n- **Options** (popup → *Manage all rules*, or the extension's Details → *Extension options*):\n  full CRUD with CodeMirror CSS/JS editors, match-pattern/glob validation, per-rule error\n  badges, a storage-quota warning, and JSON **Export / Import** (merge or replace).\n\n### Rule fields\n\n| Field | Notes |\n|---|---|\n| `matches` | Chrome match patterns, one per line, e.g. `*://*.google.com/*` |\n| `includeGlobs` / `excludeGlobs` | optional `*`/`?` globs to narrow or exclude |\n| `css` | appended to end of `\u003chead\u003e` (CSP-proof) |\n| `js` | runs at `runAt` in the chosen world |\n| `runAt` | `document_start` / `document_end` / `document_idle` (default) |\n| `jsWorld` | `MAIN` (page globals, bypasses CSP — default) or `ISOLATED` (DOM only) |\n\n### Seeded example\n\nOn first install one rule is created: matches `*://*.google.com/*`, appends a visible blue\nbanner via CSS, and `console.log`s on every google subpage. SPA navigations on Google are\nre-applied via `chrome.webNavigation.onHistoryStateUpdated`.\n\n## Notes\n\n- Your JS runs in the real page — its errors appear in the **page** console, not the\n  extension console. That's expected; the extension does not trap page-script errors.\n- No cloud sync, no Web Store. Local only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjbar-dev%2Fcustomize-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franjbar-dev%2Fcustomize-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjbar-dev%2Fcustomize-website/lists"}