Files

71 lines
2.8 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bookmarks API</title>
<link rel="stylesheet" href="ui.css">
</head>
<body class="page">
<header>
<h1>Bookmarks API for Scripting and AI</h1>
<p class="lead">An API add-on for Firefox to allow agentic and script-based management of user bookmarks.</p>
<section class="usage">
<h2>Who can use this</h2>
<p>Tools on <strong>this computer</strong> can call the API — a local script, an editor agent, or a session you opened here (SSH, remote desktop). They need a secret you issue below.</p>
<p>It does not work from chatgpt.com or other sites in a browser tab. Those run elsewhere and cannot see this machines loopback port. Pages inside Firefox are blocked too.</p>
<p class="muted">If this Firefox profile syncs bookmarks with a Mozilla account, changes made here can show up on your other devices. The API itself still only accepts connections on this machine.</p>
</section>
<ol class="process">
<li>Issue a secret for each agent or script that should be allowed to work with your bookmarks.</li>
<li>Store that secret with your secrets. This add-on keeps only a hash.</li>
<li>While Firefox is open, those tools talk to this add-on to manage your bookmarks. This page is only for deciding who is allowed.</li>
</ol>
<p id="status" class="muted"></p>
</header>
<section class="settings">
<h2>Listen port</h2>
<p class="muted">Loopback only (<code>127.0.0.1</code>). Change this if the default is already in use. Your tools must use the same port.</p>
<div class="row">
<label class="sr" for="port">Listen port</label>
<input id="port" type="number" min="1024" max="65535" step="1" value="17634">
<button id="save-port" type="button">Save port</button>
</div>
</section>
<section class="row">
<input id="name" type="text" maxlength="64" placeholder="Client name" autocomplete="off">
<button id="create" type="button">Generate secret</button>
</section>
<p id="error" class="error" hidden></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Created</th>
<th>Last used</th>
<th></th>
</tr>
</thead>
<tbody id="rows">
<tr><td colspan="4" class="muted">Loading…</td></tr>
</tbody>
</table>
<dialog id="secret-modal">
<h2>Copy this secret now</h2>
<p class="muted">It will not be shown again. Store it with your secrets.</p>
<label class="sr">Secret</label>
<textarea id="secret" readonly rows="3"></textarea>
<div class="row">
<button id="copy" type="button">Copy</button>
<button id="close" type="button">I saved it</button>
</div>
</dialog>
<script src="clients.js"></script>
<script src="options.js"></script>
</body>
</html>