blob: 1777c8731d8f20702f5c605c6bbce7546acc8b97 [file] [log] [blame]
// This method is based on the fact that when building the extension for Firefox
// the browser_specific_settings.gecko entry is included.
export function isFirefox() {
var manifest = chrome.runtime.getManifest();
return manifest.browser_specific_settings !== undefined &&
manifest.browser_specific_settings.gecko !== undefined;
}
// Returns whether the extension is a release version.
export function isReleaseVersion() {
var manifest = chrome.runtime.getManifest();
return ('version' in manifest) && manifest.version != '0';
}
// Returns the extension version
export function getExtVersion() {
var manifest = chrome.runtime.getManifest();
return manifest?.version;
}