// Which build of the extension is running. The dev channel is not a separate // extension — same id, same key, same OAuth redirect URI — so the only thing // that marks it at runtime is what scripts/dev-channel.mjs writes into the // built manifest: inverted icons, and this suffix on the name. // // Read back from the manifest rather than baked in with a build-time define, // because the suffix is applied *after* the bundle is written (a writeBundle // hook in vite.config.ts), and a watch rebuild patches dist/ the same way. /** What scripts/dev-channel.mjs appends to the name; asserted equal in the test. */ export const DEV_NAME_SUFFIX = ' (dev)' /** * True in an unpacked dev-channel build, false in the store release. Dev-only * affordances (the popup's debug menu) hang off this. */ export function isDevChannel(name = chrome.runtime.getManifest().name): boolean { return name.endsWith(DEV_NAME_SUFFIX) }