mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 01:10:12 +02:00
refactor: Add lazy loading for images in ZenThemeMarketplaceParent.sys.mjs
Improve page load performance by adding lazy loading for images in the ZenThemeMarketplaceParent.sys.mjs file. The code now downloads the preferences.json file if it exists in the theme object. This enhancement optimizes the loading of images and improves the overall user experience.
This commit is contained in:
parent
ae03ba527a
commit
7617286d3e
1 changed files with 3 additions and 0 deletions
|
@ -70,6 +70,9 @@ export class ZenThemeMarketplaceParent extends JSWindowActorParent {
|
|||
await IOUtils.makeDirectory(themePath, { ignoreExisting: true });
|
||||
await this.downloadUrlToFile(theme.style, PathUtils.join(themePath, "chrome.css"));
|
||||
await this.downloadUrlToFile(theme.readme, PathUtils.join(themePath, "readme.md"));
|
||||
if (theme.preferences) {
|
||||
await this.downloadUrlToFile(theme.preferences, PathUtils.join(themePath, "preferences.json"));
|
||||
}
|
||||
}
|
||||
|
||||
get themesRootPath() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue