From 2230d4200c67c841fc96588f846535b19410176b Mon Sep 17 00:00:00 2001 From: Local Dev Date: Sun, 27 Sep 2026 20:37:30 +0200 Subject: [PATCH] =?UTF-8?q?feat(theseus):=20protections=20live=20in=20Sett?= =?UTF-8?q?ings=20=E2=80=BA=20Performance;=20quiet=20dock=20for=20Shield?= =?UTF-8?q?=20and=20Cookie=20Pop-ups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shield and Cookie Pop-ups are settings more than tools, so their switches, the cookie mode, the counters and "Update rules" now sit in Settings › Performance under a Protections heading, driven through the add-ons' own message handlers (Settings-only IPC). Each card opens the add-on's panel for the per-site details, and each panel links back to Settings. The two add-ons start hidden from the toolbar's extension row (manifest dock:"hidden", honoured once so a user who shows them keeps them); "Show hidden" on the row brings them back. theseus://settings and theseus://settings/
are now addresses, so any page or note can link to a Settings page. Also: a Settings or add-on tab that the user navigates elsewhere stops counting as that tab, otherwise "open Settings" kept focusing a tab that no longer showed Settings. --- addons-host.js | 5 +++- bundled-addons/blocker/addon.json | 1 + bundled-addons/blocker/index.js | 1 + bundled-addons/blocker/panel.html | 3 +- bundled-addons/consent/addon.json | 1 + bundled-addons/consent/index.js | 1 + bundled-addons/consent/panel.html | 3 +- main.js | 45 ++++++++++++++++++++++++++++ settings-preload.js | 4 +++ settings.html | 50 ++++++++++++++++++++++++++++++- 10 files changed, 110 insertions(+), 4 deletions(-) diff --git a/addons-host.js b/addons-host.js index 886832cc..8366d29a 100644 --- a/addons-host.js +++ b/addons-host.js @@ -208,7 +208,10 @@ function validateManifest(raw, folderName) { // back to plain-extension rendering. const category = m.category && ["plugin"].includes(String(m.category)) ? String(m.category) : null; - return { id, name, version, description, author, icon, main, capabilities, pageInject, toolbarMenu, contextMenuItems, absorbs, category }; + // dock: "hidden" — the add-on starts without a toolbar button (its settings + // live in Settings); main honours it once, the user can show it later. + const dock = m.dock === "hidden" ? "hidden" : undefined; + return { id, name, version, description, author, icon, main, capabilities, pageInject, toolbarMenu, contextMenuItems, absorbs, category, dock }; } // Loader singleton. `discoverAndActivate(opts)` returns a snapshot the rest diff --git a/bundled-addons/blocker/addon.json b/bundled-addons/blocker/addon.json index c0008c2f..cf35cda8 100644 --- a/bundled-addons/blocker/addon.json +++ b/bundled-addons/blocker/addon.json @@ -6,6 +6,7 @@ "author": "Silent Mode", "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDJMNCA1djdjMCA1IDMuNSA5LjIgOCAxMCA0LjUtLjggOC01IDgtMTBWNWwtOC0zeiIgZmlsbD0iIzRjOWVmZiIvPjxwYXRoIGQ9Ik05LjIgOS4yIDE0LjggMTQuOE0xNC44IDkuMiA5LjIgMTQuOCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==", "main": "index.js", + "dock": "hidden", "capabilities": ["sidebar-panel", "request-filter"], "updateURL": "https://navigate.st/bns/theseus.x/extensions/blocker/updates.json" } diff --git a/bundled-addons/blocker/index.js b/bundled-addons/blocker/index.js index 944004a8..0f1bd868 100644 --- a/bundled-addons/blocker/index.js +++ b/bundled-addons/blocker/index.js @@ -193,6 +193,7 @@ async function activate(a) { persistAllow(); pushState(); return snapshot(); }); api.onMessage("refresh-lists", () => refreshLists("manual")); + api.onMessage("open-settings", () => { api.openSettings("performance"); return true; }); // Filter first, engine second: requests made while the engine builds pass // through (a few hundred milliseconds on first run), which beats holding diff --git a/bundled-addons/blocker/panel.html b/bundled-addons/blocker/panel.html index a40a3fe8..1deaab0b 100644 --- a/bundled-addons/blocker/panel.html +++ b/bundled-addons/blocker/panel.html @@ -75,7 +75,7 @@ h2 { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; -
Shield stops requests to known tracking and advertising hosts before they leave Theseus. It does not hide leftover empty ad boxes yet. If a site misbehaves, allow it here and reload.
+
Manage in Settings · Shield stops requests to known tracking and advertising hosts before they leave Theseus. It does not hide leftover empty ad boxes yet. If a site misbehaves, allow it here and reload.