Files
plugins/packages/free-tokens/page/index.html
T
Mingchen Yuandsljdxde 7262e70c6c free-tokens: AIHOT Token 羊毛 page (#885)
New page plugin: AIHOT's Token 羊毛 (free model allowances), sorted into "ready" / "plugin to set up" / "no plugin" against the user's own magpie plugins. Only the vendors in src/allowlist.js are shown; anything else (relays included) is dropped before it reaches the page.

AIHOT's written approval (2026-11-10) is quoted on the PR: free, no ads or sponsors, each user reads it once on their own computer, no proxy, mirror or redistribution, credited in the footer.

Run at 07da91b0 (on mote):
- bun test packages/free-tokens: 62 pass. bun scripts/check.mjs free-tokens: ok.
- The page served with magpie's page CSP in a sandbox="allow-scripts" frame, Chromium and WebKit: tiles 1/2/1 for a fixture of MiniMax (signed in, checked in today), ZCode (installed, not signed in), Zed (not installed), DeepSeek (no plugin) and an unlisted relay (dropped); install popover gives @magpie-community/opencode-zed-auth, login popover "magpie plugin login zcode"; a title holding <img onerror> is shown as text; brand icons load; no dialog.
- Every mapped package checked: 8 on npm, 5 on the dist branch, and each pid is the package's provider id.
- Broken by hand: checkin null guard removed, title unescaped, Zed's npm name unscoped; each turns a test red.

Not tried: a real magpie window with the plugin installed, and the live aihot.news route (no network in the run).

Co-authored-by: sljdxde <sljdxde@users.noreply.github.com>
2026-11-10 09:28:19 +08:00

32 lines
1.2 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Token 羊毛</title>
<link rel="stylesheet" href="style.css">
<script src="_magpie/bridge.js"></script>
<script src="view.js" defer></script>
<script src="app.js" defer></script>
</head>
<body>
<header class="top">
<div>
<h1>Token 羊毛</h1>
<p class="sub">看你的 magpie:哪些羊毛已能用、哪些差个插件、哪些还没插件 · 数据源 AIHOT</p>
</div>
</header>
<p class="summary" id="summary"></p>
<div class="tiles" id="buckets"></div>
<p class="hint" id="tabhint"></p>
<label class="find">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M20 20l-3.5-3.5"/></svg>
<input id="q" type="search" placeholder="在这一档里搜索厂商或羊毛…" autocomplete="off">
</label>
<div class="list" id="list"></div>
<p class="empty" id="empty" style="display:none">这一档没有符合条件的羊毛</p>
<p class="foot-note" id="footNote"></p>
<div class="toast" id="toast"></div>
</body>
</html>