AppAgg icon indicating copy to clipboard operation
AppAgg copied to clipboard

Add an Options page (`options_ui`) so settings appear in about:addons → “Options”

Open Korb opened this issue 1 week ago • 1 comments

Problem

In Firefox, the add-on's page in about:addons has only the Details, Permissions and data and Release Notes tabs. There is no Options tab. Firefox users expect to find extension settings there, so when it's missing it looks like the extension has no settings at all. Right now the only setting, “Show the AppAgg box on store pages”, sits in a collapsed “Settings” <details> block at the bottom of the toolbar popup, where it's easy to miss.

Cause

manifest.json (v4.1.0) has no options_ui key, and Firefox shows the Options tab only when that key is set (MDN: options_ui). The setting is saved as card in storage.local (see popup.js), so it would be easy to show it on a separate page too.

Proposed solution

(keep the popup control and add the same setting to about:addons)

  1. Add to manifest.json:
    "options_ui": {
      "page": "options.html",
      "open_in_tab": false
    }
    
    This makes the page show up embedded in the about:addons Options tab. Chrome supports the same key and shows the page in an chrome://extensions dialog.
  2. Add a small options.html + options.js that reuse the existing popup.css and the settings / showCard i18n strings. The script just reads and writes the same value:
    const ext = globalThis.browser || globalThis.chrome;
    const cb = document.getElementById('card-on');
    document.getElementById('card-label').textContent = ext.i18n.getMessage('showCard');
    ext.storage.local.get({card: true}).then(s => { cb.checked = s.card; });
    cb.addEventListener('change', () => ext.storage.local.set({card: cb.checked}));
    
  3. Optional: in the popup, make the “Settings” summary (or a ⚙ icon) call ext.runtime.openOptionsPage(), so there's a single place for settings that future options can be added to (MDN: runtime.openOptionsPage).
  4. If the popup and the options page are open at the same time, keep them in sync with storage.onChanged. Content scripts that already read card don't need any changes.

No new permissions are needed, since storage is already declared.

Environment

  • Mozilla Firefox 161.0b5
  • AppAgg: price history, deals and lists 4.1.0 (Nov 7, 2026)

Korb avatar Nov 22 '26 15:11 Korb

Thanks for the detailed write-up! Done in version 4.2.0, which is now live on Firefox Add-ons. Its release notes: a Settings page (about:addons → AppAgg → Options) and a checkbox to hide "Search AppAgg" from the right-click menu for selected text.

upagg avatar Nov 23 '26 12:11 upagg