refactor: Add lazy loading for images in ZenThemeMarketplaceChild.sys.mjs

Add lazy loading for images in the ZenThemeMarketplaceChild.sys.mjs file to improve page load performance. The `addIntallButtons` method has been modified to select all action buttons and error messages, and remove any existing error messages. It also adds event listeners to the action buttons for installing themes. Additionally, a new `installTheme` method has been added to handle the installation of themes when a button is clicked.
This commit is contained in:
Mauro Balades 2024-08-17 01:32:35 +02:00
parent 272f8be26d
commit 1ff19edeb3

View file

@ -20,7 +20,6 @@ export class ZenThemeMarketplaceChild extends JSWindowActorChild {
}
async addIntallButtons() {
return;
const actionButton = this.contentWindow.document.getElementById("install-theme");
const errorMessage = this.contentWindow.document.getElementById("install-theme-error");
if (actionButton) {