BikeControl (SwiftControl)
使用 Zwift Click、Zwift Play、Shimano Di2 或任何藍牙控制器,搭配 MyWhoosh、Rouvy、Zwift 等。iOS、Android、Windows、macOS 均可免費試用。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Look up the all-time record between any two college teams in football or men's basketball, with every game in the series.
Site: https://mattrudy13.github.io/h2h/
cfb-h2h.html): series record, ties and every game, from
CollegeFootballData.comcbb-h2h.html): series record and every game, from
CollegeBasketballData.com. Scheduled games are listed as
upcoming and don't count toward the record.Each matchup shows the series record, highlights (current and longest streaks, last meeting, biggest wins) and a record-by-decade chart. Team vs Conference mode shows a team's all-time record against every current member of a conference.
The home page searches either sport and lists your recent lookups (saved in that browser only), each with its current record.
Matchups can be linked: cfb-h2h.html?t1=Michigan&t2=Ohio+State (or ?t1=Michigan&conf=Big+Ten)
runs that comparison on load, and the URL updates after each compare. Team names accept common abbreviations and
nicknames (e.g. UNC, OSU, "Ohio St"), and the page suggests close matches for typos.
Both APIs need a key, and anything a static page loads is public, so the pages never see
the key. They call a Cloudflare Worker (worker/), which adds the key and forwards the
request:
browser ──> h2h-proxy.mattrudy13.workers.dev/cfb/... ──> api.collegefootballdata.com
/cbb/... ──> api.collegebasketballdata.com
The Worker:
CFBD_API_KEY, set in Cloudflare and never in git (one key
works for both APIs)https://mattrudy13.github.io and localhost/cfb/teams/fbs, /cfb/teams/matchup,
/cbb/teams, /cbb/games), so it can't be used as an open proxy for the key/cfb/record and /cbb/record?team1=&team2= itself with just the series totals,
so the recent-lookup records don't download whole basketball historiesCACHE_VERSION in worker/src/index.js and redeploy.Football's Team vs Conference makes one matchup request per member (about 17 for the Big Ten), 4 at a time, because the API has no per-team history endpoint. Basketball's needs only one request.
The Worker's URL lives in proxy-config.js. It isn't a secret.
| Path | What it is |
|---|---|
index.html | Home page: search either sport, recent lookups |
cfb-h2h.html | Football page |
cbb-h2h.html | Basketball page |
style.css | Shared styles for all three pages (light and dark) |
common.js | Shared page code: team matching, logos and colors, scoreboard, links |
proxy-config.js | Worker URL the pages call |
worker/src/index.js | The Cloudflare Worker |
worker/wrangler.toml | Worker config |
worker/.dev.vars | API key for local Worker runs (gitignored, not in the repo) |
The pages are plain HTML with no build step. Serve the folder over HTTP rather than opening
the files directly, because the Worker rejects requests whose origin is file://:
python3 -m http.server 8000 # open http://localhost:8000
This uses the deployed Worker. To change the Worker itself, run it locally too:
cd worker
echo "CFBD_API_KEY=<your key>" > .dev.vars # once; gitignored
npx wrangler dev # serves on http://localhost:8787
Then point proxy-config.js at http://localhost:8787, and switch it back before
committing.
main publishes the site (Settings → Pages → deploy from
main, root). No build step.worker/:
cd worker
npx wrangler deploy
The key stays in Cloudflare across deploys. To change it: npx wrangler secret put CFBD_API_KEY.To allow another origin or endpoint, edit ALLOWED_ORIGINS / ALLOWED_PATHS in
worker/src/index.js and redeploy.
A free key is available at https://collegefootballdata.com/key. If it leaks, get a new one
and update it with npx wrangler secret put CFBD_API_KEY and in worker/.dev.vars.