"webstore" when the browser manages updates, otherwise "manual".
Detection reads chrome.runtime.getManifest().update_url, which the Chrome
Web Store injects into the runtime manifest — our shipped manifest.json
has no such key. This needs no permission, unlike
chrome.management.getSelf().installType. Caveats:
"manual" and
take the GitHub path. Harmless: AMO auto-updates silently, so a newer
release is normally only visible in the window between a GitHub release and
AMO approval.update_url would be reported as
"webstore".update_url and are correctly
treated as auto-updating.getInstallSource(); // "manual" for an unpacked build loaded from dist/
export function getInstallSource(): InstallSource {
const manifest = chrome.runtime.getManifest();
return 'update_url' in manifest && manifest.update_url ? 'webstore' : 'manual';
}
Reports how the extension was installed, so callers know whether the browser will update it automatically.