Get name of extension from manifest
This commit is contained in:
parent
df8676c95e
commit
f182a1fcfc
|
@ -25,7 +25,7 @@
|
||||||
<header>
|
<header>
|
||||||
|
|
||||||
<img class="icon-logo" src="../../icons/icon.svg" alt="Extension Icon">
|
<img class="icon-logo" src="../../icons/icon.svg" alt="Extension Icon">
|
||||||
<div class="heading">LocalCDN <sup id="version-label" class="label-version"></sup></div>
|
<div class="heading"><span id="name-label"></span> <sup id="version-label" class="label-version"></sup></div>
|
||||||
|
|
||||||
<div id="donate-button">
|
<div id="donate-button">
|
||||||
<p id="label-donate" data-i18n-content="labelDonate">Donate</p>
|
<p id="label-donate" data-i18n-content="labelDonate">Donate</p>
|
||||||
|
|
|
@ -52,9 +52,10 @@ popup._renderContents = function () {
|
||||||
|
|
||||||
popup._renderNonContextualContents = function () {
|
popup._renderNonContextualContents = function () {
|
||||||
|
|
||||||
let versionLabelElement, counterElement, testingUtilityLinkElement, optionsButtonElement, donationButtonElement, infoButtonLabel, infoButtonSVG;
|
let versionLabelElement, nameLabelElement, counterElement, testingUtilityLinkElement, optionsButtonElement, donationButtonElement, infoButtonLabel, infoButtonSVG;
|
||||||
|
|
||||||
versionLabelElement = document.getElementById('version-label');
|
versionLabelElement = document.getElementById('version-label');
|
||||||
|
nameLabelElement = document.getElementById('name-label');
|
||||||
counterElement = document.getElementById('injection-counter');
|
counterElement = document.getElementById('injection-counter');
|
||||||
testingUtilityLinkElement = document.getElementById('testing-utility-link');
|
testingUtilityLinkElement = document.getElementById('testing-utility-link');
|
||||||
optionsButtonElement = document.getElementById('options-button');
|
optionsButtonElement = document.getElementById('options-button');
|
||||||
|
@ -62,6 +63,7 @@ popup._renderNonContextualContents = function () {
|
||||||
infoButtonLabel = document.getElementById('manipulateDOM-indicator');
|
infoButtonLabel = document.getElementById('manipulateDOM-indicator');
|
||||||
|
|
||||||
versionLabelElement.innerText = popup._version;
|
versionLabelElement.innerText = popup._version;
|
||||||
|
nameLabelElement.innerText = popup._name;
|
||||||
counterElement.innerText = helpers.formatNumber(popup._amountInjected);
|
counterElement.innerText = helpers.formatNumber(popup._amountInjected);
|
||||||
|
|
||||||
testingUtilityLinkElement.addEventListener('mouseup', popup._onTestingUtilityLinkClicked);
|
testingUtilityLinkElement.addEventListener('mouseup', popup._onTestingUtilityLinkClicked);
|
||||||
|
@ -451,6 +453,7 @@ popup._onDocumentLoaded = function () {
|
||||||
manifest = chrome.runtime.getManifest();
|
manifest = chrome.runtime.getManifest();
|
||||||
language = navigator.language;
|
language = navigator.language;
|
||||||
|
|
||||||
|
popup._name = manifest.name;
|
||||||
popup._version = helpers.formatVersion(manifest.version);
|
popup._version = helpers.formatVersion(manifest.version);
|
||||||
popup._scriptDirection = helpers.determineScriptDirection(language);
|
popup._scriptDirection = helpers.determineScriptDirection(language);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue