You've already forked hotpocket
BTHLABS-66: Prepping for public release: Take two
This commit is contained in:
@@ -19,15 +19,22 @@ class Popup {
|
||||
this.timeout = null;
|
||||
}
|
||||
};
|
||||
replaceInnerHTML = (element, content) => {
|
||||
for (let child of element.childNodes) {
|
||||
element.removeChild(child);
|
||||
}
|
||||
|
||||
element.insertAdjacentHTML('beforeend', content);
|
||||
};
|
||||
setContent = (content) => {
|
||||
const shadow = this.container.shadowRoot;
|
||||
|
||||
const body = shadow.querySelector('.hotpocket-extension-popup-body');
|
||||
body.innerHTML = content;
|
||||
this.replaceInnerHTML(body, content);
|
||||
|
||||
const i18nElements = shadow.querySelectorAll('[data-message]');
|
||||
for (let i18nElement of i18nElements) {
|
||||
i18nElement.innerHTML = HotPocketExtension.api.i18n.getMessage(
|
||||
i18nElement.textContent = HotPocketExtension.api.i18n.getMessage(
|
||||
i18nElement.dataset.message,
|
||||
);
|
||||
}
|
||||
@@ -48,7 +55,7 @@ class Popup {
|
||||
this.container.hotPocketExtensionPopup = this;
|
||||
|
||||
const shadow = this.container.attachShadow({mode: 'open'});
|
||||
shadow.innerHTML = POPUP;
|
||||
shadow.setHTMLUnsafe(POPUP);
|
||||
|
||||
this.setContent(content);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "@Extension.HotPocket.BTHLabs",
|
||||
"id": "@Production.Extension.HotPocket.BTHLabs",
|
||||
"strict_min_version": "142.0",
|
||||
"data_collection_permissions": {
|
||||
"required": [
|
||||
@@ -24,4 +24,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user