diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-18 08:01:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 13:01:22 +0000 |
commit | 90449bc745546f0f25bc93ee4b06d21b7c0210e8 (patch) | |
tree | 728153aaa4588a7340c3f3a45008989c0f5521b3 /ext/js/extension | |
parent | c2e3f60e51529f05284fea5f5bc1afcd1674f5ca (diff) |
Log update (#701)
* Don't export Logger
* Rename logger.js to log.js
* Move helper function
* Update extension name configuration
* Simplify docs
* Move issue URL to a field
* Simplify context
* Remove optional params that are never used
* Configure backend
* Update eslint
* Simplify
* Rename function
* Simplify _api reference
* Simplify docs
* Remove unused log levels (except 'log')
* Add log function
* Rename for more clear intent
* Use log.log
Diffstat (limited to 'ext/js/extension')
-rw-r--r-- | ext/js/extension/web-extension.js | 13 |
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} |