summaryrefslogtreecommitdiff
path: root/ext/js/extension
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/extension')
-rw-r--r--ext/js/extension/web-extension.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/js/extension/web-extension.js b/ext/js/extension/web-extension.js
index bdc9b1b3..ea72ba2f 100644
--- a/ext/js/extension/web-extension.js
+++ b/ext/js/extension/web-extension.js
@@ -33,6 +33,14 @@ export class WebExtension extends EventDispatcher {
} catch (e) {
// NOP
}
+ /** @type {string} */
+ this._extensionName = 'Extension';
+ try {
+ const {name, version} = chrome.runtime.getManifest();
+ this._extensionName = `${name} ${version}`;
+ } catch (e) {
+ // NOP
+ }
}
/** @type {boolean} */
@@ -40,6 +48,11 @@ export class WebExtension extends EventDispatcher {
return this._unloaded;
}
+ /** @type {string} */
+ get extensionName() {
+ return this._extensionName;
+ }
+
/**
* @param {string} path
* @returns {string}