diff --git a/README.md b/README.md index fb72e34..dd776ca 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ Fastest way to try PageAgent with our free Demo LLM: > **⚠️ For technical evaluation only.** This demo CDN uses our free [testing LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api). By using it, you agree to its [terms](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md). -| Mirrors | URL | -| ------- | ---------------------------------------------------------------------------------- | +| Mirrors | URL | +| ------- | ----------------------------------------------------------------------------------- | | Global | https://cdn.jsdelivr.net/npm/page-agent@1.10.0/dist/iife/page-agent.demo.js | | China | https://registry.npmmirror.com/page-agent/1.10.0/files/dist/iife/page-agent.demo.js | diff --git a/docs/README-zh.md b/docs/README-zh.md index 26fd462..cd04ddf 100644 --- a/docs/README-zh.md +++ b/docs/README-zh.md @@ -49,8 +49,8 @@ https://github.com/user-attachments/assets/a1f2eae2-13fb-4aae-98cf-a3fc1620a6c2 > **⚠️ 仅用于技术评估。** 该 Demo CDN 使用了免费的[测试 LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api),使用即表示您同意其[条款](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md)。 -| Mirrors | URL | -| ------- | ---------------------------------------------------------------------------------- | +| Mirrors | URL | +| ------- | ----------------------------------------------------------------------------------- | | Global | https://cdn.jsdelivr.net/npm/page-agent@1.10.0/dist/iife/page-agent.demo.js | | China | https://registry.npmmirror.com/page-agent/1.10.0/files/dist/iife/page-agent.demo.js | diff --git a/packages/website/src/hooks/useGitHubStars.ts b/packages/website/src/hooks/useGitHubStars.ts index 8b68e60..d5bd6e6 100644 --- a/packages/website/src/hooks/useGitHubStars.ts +++ b/packages/website/src/hooks/useGitHubStars.ts @@ -9,13 +9,15 @@ export function useGitHubStars() { useEffect(() => { if (cached !== null) return - fetch(STATS_URL) + const controller = new AbortController() + fetch(STATS_URL, { signal: controller.signal }) .then((r) => r.json()) .then((data) => { cached = data.stargazers_count ?? null setStars(cached) }) .catch(() => {}) + return () => controller.abort() }, []) return stars