Files
autofirmer-expanded/extension/popup.html
T
Brandon LiandClaude Fable 5 1bf8ba8693 extension: detect activatable Topstep accounts
Add a popup button that scans the Topstep dashboard's GraphQL API
(crystal.topstep.com) for passed evaluations that can still be
activated into an Express Funded account.

An eval is activatable when its status is "Passed" and its subscription
id is not shared by ANY funded account it ever spawned — regardless of
that funded account's current status, since activation is one-way. The
result and its progress are mirrored to chrome.storage so the popup
renders them independent of the message port (avoids the "message port
closed" error on this ~20s scan). Activatable accounts link to their
Topstep detail page.

Adds https://*.topstep.com/* host permission; bumps to 0.15.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-15 10:33:56 -05:00

53 lines
2.6 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<style>
body { width: 300px; margin: 0; padding: 14px; font: 13px/1.4 system-ui, sans-serif; color: #1e293b; }
h1 { font-size: 14px; margin: 0 0 10px; }
label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin: 10px 0 3px; }
input { width: 100%; box-sizing: border-box; padding: 5px 7px; font: 12px ui-monospace, monospace;
border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; }
button { margin-top: 12px; padding: 6px 10px; font-size: 12px; font-weight: 500; border: 0;
border-radius: 6px; background: #3b82f6; color: #fff; cursor: pointer; }
button.ghost { background: #e2e8f0; color: #334155; margin-left: 6px; }
#status { margin-bottom: 10px; padding: 8px; border-radius: 6px; background: #f1f5f9; font-size: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.muted { color: #64748b; font-size: 11px; }
.err { color: #dc2626; font-size: 11px; margin-top: 4px; word-break: break-word; }
hr { border: 0; border-top: 1px solid #e2e8f0; margin: 14px 0 4px; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin: 10px 0 6px; }
button.wide { width: 100%; margin-left: 0; }
#tsResult { margin-top: 10px; font-size: 12px; }
#tsResult .big { font-size: 22px; font-weight: 600; color: #0f172a; }
#tsResult ul { margin: 8px 0 0; padding-left: 16px; max-height: 160px; overflow-y: auto; }
#tsResult li { font: 11px ui-monospace, monospace; color: #334155; margin-bottom: 2px; }
#tsResult li a { color: #2563eb; text-decoration: none; }
#tsResult li a:hover { text-decoration: underline; }
</style>
</head>
<body>
<h1>AutoFirmer Capture</h1>
<div id="status"></div>
<label for="apiBase">Dashboard URL</label>
<input id="apiBase" placeholder="http://localhost:3000" />
<label for="pollSeconds">Poll interval (seconds)</label>
<input id="pollSeconds" type="number" min="1" max="120" />
<label for="elementSelector">Element selector (optional)</label>
<input id="elementSelector" placeholder="button.buy" />
<button id="save">Save</button>
<button id="now" class="ghost">Capture now</button>
<hr />
<div class="section-title">Topstep accounts</div>
<button id="tsCheck" class="wide">Check activatable accounts</button>
<div id="tsResult"></div>
<script src="popup.js"></script>
</body>
</html>