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; -