diff --git a/CHANGELOG.md b/CHANGELOG.md index 5903c7f..96f6008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,11 @@ version bump). ## [Unreleased] -Nothing yet. +### Changed + +- **About → Store listing** on a copy installed from Microsoft Edge Add-ons now + opens BookmarkMagic's Edge Add-ons page, live since 2026-11-19. Until now it + opened the install section of the project's README. ## [1.3.0] — 2026-11-18 diff --git a/docs/06_UI.md b/docs/06_UI.md index aeff2c4..94f917c 100644 --- a/docs/06_UI.md +++ b/docs/06_UI.md @@ -398,10 +398,12 @@ only route a user has from inside the product to rate or review it, which `13 §6` depends on. Since v1.3.0 one package serves the Chrome Web Store and Edge Add-ons, so the link is chosen at run time (`links.ts` `storeUrlFor`): the Firefox build → the AMO listing, addressed by the gecko id; a Chromium -copy whose `runtime.id` is the Chrome Web Store item id (`00 §9`) → that -listing; anything else — an Edge Add-ons install, an unpacked build → the -README's install section, which lists every store. The label was "Chrome Web -Store" until then. +copy whose `runtime.id` is a store's item id (`00 §9`) → that store's +listing — the Chrome Web Store's, or Edge Add-ons' (mapped after the listing +went live on 2026-11-19, so from the release after 1.3.0); anything else — an +unpacked build → the README's install section, which lists every store. 1.3.0 +itself sends an Edge Add-ons install to that section, which links the Edge +listing too. The label was "Chrome Web Store" until v1.3.0. **No email address appears anywhere in the product.** Since v1.1.0 the project's addresses are per purpose (`security@` in `SECURITY.md`, `privacy@` in diff --git a/src/lib/links.ts b/src/lib/links.ts index e2ad5bc..b63e602 100644 --- a/src/lib/links.ts +++ b/src/lib/links.ts @@ -33,6 +33,22 @@ const CWS_ITEM_ID = 'eghnciphhegekmnofffpgbdfefckdhmg'; /** The published Chrome Web Store listing. */ const CWS_URL = `https://chromewebstore.google.com/detail/bookmarkmagic/${CWS_ITEM_ID}`; +/** + * The Edge Add-ons item id — Partner Center's "CRX ID", and the `runtime.id` + * of every copy installed from Edge Add-ons (docs/00 §9). Not the Product ID, + * which is what the `EDGE_PRODUCT_ID` secret needs. + */ +const EDGE_ITEM_ID = 'nchfchjnlihbifggooggpmmacighmdjg'; + +/** The published Edge Add-ons listing (live since 2026-11-19). */ +const EDGE_URL = `https://microsoftedge.microsoft.com/addons/detail/${EDGE_ITEM_ID}`; + +/** Each Chromium store's item id → its listing. */ +const CHROMIUM_LISTINGS: ReadonlyMap = new Map([ + [CWS_ITEM_ID, CWS_URL], + [EDGE_ITEM_ID, EDGE_URL], +]); + /** * The Firefox Add-ons listing, addressed by the gecko id, which AMO resolves * (docs/13 §8). The "@" is percent-encoded on purpose: AMO decodes it, and the @@ -49,8 +65,9 @@ const INSTALL_URL = `${REPO_URL}#install`; * The only route from inside the product to rating or reviewing it, which * docs/13 §6 lists as a post-launch channel. One Chromium package serves the * Chrome Web Store and Edge Add-ons, so the Chromium choice is made at run - * time, by extension id: the Chrome Web Store's own id gets its listing, any - * other (an Edge Add-ons install, an unpacked build) the install section. + * time, by extension id: each store's own id gets its listing (an Edge user + * who installed from the Chrome Web Store has that store's id, and gets that + * listing), any other id (an unpacked build) the install section. * * There is deliberately **no support email here.** Putting an address on an * in-product surface invites users to mail their real bookmarks file, which is @@ -61,7 +78,7 @@ const INSTALL_URL = `${REPO_URL}#install`; */ export function storeUrlFor(install: { firefox: boolean; extensionId: string }): string { if (install.firefox) return AMO_URL; - return install.extensionId === CWS_ITEM_ID ? CWS_URL : INSTALL_URL; + return CHROMIUM_LISTINGS.get(install.extensionId) ?? INSTALL_URL; } export interface LabelledLink { diff --git a/tests/unit/links.test.ts b/tests/unit/links.test.ts index 3407af4..1aac0af 100644 --- a/tests/unit/links.test.ts +++ b/tests/unit/links.test.ts @@ -116,8 +116,13 @@ describe('store listing', () => { const amo = storeUrlFor({ firefox: true, extensionId: 'anything' }); expect(amo).toBe('https://addons.mozilla.org/firefox/addon/bookmarkmagic%40poli0981.dev/'); expect(decodeURIComponent(amo)).toContain('bookmarkmagic@poli0981.dev'); - // A Chromium copy with any other id — Edge Add-ons assigns its own, an - // unpacked build gets a random one — goes to the list of every store. + // Edge Add-ons assigns its own id — Partner Center's "CRX ID", not the + // Product ID — and an install from there gets the Edge listing. + expect(storeUrlFor({ firefox: false, extensionId: 'nchfchjnlihbifggooggpmmacighmdjg' })).toBe( + 'https://microsoftedge.microsoft.com/addons/detail/nchfchjnlihbifggooggpmmacighmdjg', + ); + // A Chromium copy with any other id — an unpacked build gets a random + // one — goes to the list of every store. expect(storeUrlFor({ firefox: false, extensionId: 'abcdefghijklmnopabcdefghijklmnop' })).toBe( `${REPO_URL}#install`, );