{"id":15099496,"url":"https://github.com/holy-two/anchor-proxy","last_synced_at":"2026-02-01T03:01:22.804Z","repository":{"id":225759874,"uuid":"766778571","full_name":"holy-two/anchor-proxy","owner":"holy-two","description":"透過 WebComponent 對所有的 a 標簽進行代理事件及攔截","archived":false,"fork":false,"pushed_at":"2024-07-27T14:08:54.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T11:50:04.371Z","etag":null,"topics":["event-delegation","webcomponents"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@holy-two/anchor-proxy","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/holy-two.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,"zenodo":null}},"created_at":"2024-03-04T05:27:41.000Z","updated_at":"2024-07-27T14:08:57.000Z","dependencies_parsed_at":"2025-06-14T03:15:50.837Z","dependency_job_id":null,"html_url":"https://github.com/holy-two/anchor-proxy","commit_stats":null,"previous_names":["holy-two/anchor-proxy"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/holy-two/anchor-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holy-two%2Fanchor-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holy-two%2Fanchor-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holy-two%2Fanchor-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holy-two%2Fanchor-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holy-two","download_url":"https://codeload.github.com/holy-two/anchor-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holy-two%2Fanchor-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28965436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T02:14:24.993Z","status":"ssl_error","status_checked_at":"2026-02-01T02:13:55.706Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["event-delegation","webcomponents"],"created_at":"2024-09-25T17:22:17.006Z","updated_at":"2026-02-01T03:01:22.786Z","avatar_url":"https://github.com/holy-two.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @holy-two/anchor-proxy\n\n透過 WebComponent 封裝的一個對所有的 `a` 標簽進行代理事件及攔截的功能\n\n## 安裝\n\n```bash\npnpm i @holy-two/anchor-proxy\n```\n\n## 基本\n\n```html\n\u003cscript type=\"module\"\u003e\n  import \"@holy-two/anchor-proxy\"\n\u003c/script\u003e\n\n\u003canchor-proxy\u003e\n  \u003ca href=\"/\"\u003e主頁\u003c/a\u003e\n\u003c/anchor-proxy\u003e\n\n\u003cscript type=\"module\"\u003e\n  const ap = document.createElement(\"anchor-proxy\")\n\n  ap.addEventListener(\"anchor-click\", e =\u003e {\n    console.log(e.detail)\n  })\n\u003c/script\u003e\n```\n\n### 例外\n\n```html\n\u003canchor-proxy\u003e\n  \u003ca href=\"/\"\u003e主頁\u003c/a\u003e\n  \u003ca href=\"/admin\" data-proxy-disabled\u003e後臺\u003c/a\u003e\n\u003c/anchor-proxy\u003e\n\n\u003cscript type=\"module\"\u003e\n  const ap = document.createElement(\"anchor-proxy\")\n\n  ap.proxyFilters = [\n    (href, target) =\u003e !target.hasAttribute(\"data-proxy-disabled\"),\n  ]\n\u003c/script\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholy-two%2Fanchor-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholy-two%2Fanchor-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholy-two%2Fanchor-proxy/lists"}