diff --git a/configs/common/mozconfig b/configs/common/mozconfig
index 364464cd..02fcdc3b 100644
--- a/configs/common/mozconfig
+++ b/configs/common/mozconfig
@@ -107,6 +107,9 @@ mk_add_options MOZ_DATA_REPORTING=
mk_add_options MOZ_SERVICES_HEALTHREPORT=
mk_add_options MOZ_TELEMETRY_REPORTING=
+ac_add_options MOZ_DATA_REPORTING=
+ac_add_options MOZ_TELEMETRY_REPORTING=
+
# Allow loading unsigned extensions
export MOZ_REQUIRE_SIGNING=
mk_add_options MOZ_REQUIRE_SIGNING=
diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js
index 8d3d824e..c960c391 100644
--- a/src/browser/app/profile/zen-browser.js
+++ b/src/browser/app/profile/zen-browser.js
@@ -279,9 +279,6 @@ pref('browser.download.open_pdf_attachments_inline', true);
pref('browser.download.alwaysOpenPanel', false);
// Tracking protection
-pref("urlclassifier.trackingSkipURLs", "*.reddit.com, *.x.com, *.twimg.com, *.tiktok.com");
-pref("urlclassifier.features.socialtracking.skipURLs", "*.instagram.com, *.x.com, *.twimg.com");
-pref("network.cookie.sameSite.noneRequiresSecure", true);
pref("browser.helperApps.deleteTempFileOnExit", true);
pref("browser.uitour.enabled", false);
diff --git a/src/zen/common/ZenUIManager.mjs b/src/zen/common/ZenUIManager.mjs
index 19b32702..0afb0ca0 100644
--- a/src/zen/common/ZenUIManager.mjs
+++ b/src/zen/common/ZenUIManager.mjs
@@ -631,7 +631,7 @@ var gZenVerticalTabsManager = {
try {
gURLBar.zenUpdateLayoutBreakout();
} catch (e) {
- console.error(e);
+ console.warn(e);
}
}
},
diff --git a/src/zen/tabs/ZenPinnedTabManager.mjs b/src/zen/tabs/ZenPinnedTabManager.mjs
index 118dc55b..f68fa117 100644
--- a/src/zen/tabs/ZenPinnedTabManager.mjs
+++ b/src/zen/tabs/ZenPinnedTabManager.mjs
@@ -290,7 +290,7 @@
container.insertBefore(newTab, container.lastChild);
}
} else {
- document.getElementById('zen-essentials-container').appendChild(newTab);
+ ZenWorkspaces.getEssentialsSection(pin.containerTabId).appendChild(newTab);
}
gBrowser.tabContainer._invalidateCachedTabs();
newTab.initialize();
@@ -1008,6 +1008,7 @@
if (!pin) {
return;
}
+
if (pin.url === 'about:blank' && tab.linkedBrowser.currentURI.spec !== 'about:blank') {
await this.replacePinnedUrlWithCurrent(tab);
}
diff --git a/src/zen/welcome/ZenWelcome.mjs b/src/zen/welcome/ZenWelcome.mjs
index 8f0e188b..5a7083ef 100644
--- a/src/zen/welcome/ZenWelcome.mjs
+++ b/src/zen/welcome/ZenWelcome.mjs
@@ -42,13 +42,57 @@
window.MozXULElement.insertFTLIfNeeded('browser/zen-welcome.ftl');
}
- function openInitialPinTab() {
- const tabs = ['https://reddit.com/r/zen_browser', 'https://x.com/zen_browser'];
- for (const url of tabs) {
- const tab = window.gBrowser.addTrustedTab(url, {
+ var _iconToData = {};
+
+ async function getIconData(iconURL) {
+ if (_iconToData[iconURL]) {
+ return _iconToData[iconURL];
+ }
+ const response = await fetch(iconURL);
+ if (!response.ok) {
+ console.error(`Failed to fetch icon: ${iconURL}`);
+ return null;
+ }
+ const blob = await response.blob();
+ const reader = new FileReader();
+ const data = await new Promise((resolve) => {
+ reader.onloadend = () => {
+ const base64Data = reader.result.split(',')[1];
+ _iconToData[iconURL] = `data:${blob.type};base64,${base64Data}`;
+ resolve(_iconToData[iconURL]);
+ };
+ reader.readAsDataURL(blob);
+ });
+ return data;
+ }
+
+ async function setCachedFaviconForURL(pageUrl, iconURL) {
+ try {
+ // TODO: This always return "NS_ERROR_NOT_AVAILABLE" for some reason, figure out why
+ await PlacesUtils.favicons.setFaviconForPage(
+ Services.io.newURI(pageUrl),
+ Services.io.newURI('fake-favicon-uri:' + pageUrl),
+ Services.io.newURI(iconURL)
+ );
+ } catch (ex) {
+ console.error(`Failed to set cached favicon for ${pageUrl}: ${ex}`);
+ }
+ }
+
+ async function openInitialPinTab() {
+ const tabs = [
+ ['https://reddit.com/r/zen_browser', 'Zen on Reddit', 'https://zen-browser.github.io/static-cdn/reddit.png'],
+ ['https://x.com/zen_browser', 'Zen on Twitter', 'https://zen-browser.github.io/static-cdn/x.png'],
+ ];
+ for (const site of tabs) {
+ const tab = window.gBrowser.addTrustedTab(site[0], {
inBackground: true,
- skipAnimation: true,
+ createLazyBrowser: true,
+ lazyTabTitle: site[1],
});
+ const iconData = await getIconData(site[2]);
+ await setCachedFaviconForURL(site[0], iconData);
+ gBrowser.setIcon(tab, iconData);
_tabsToPin.push(tab);
}
}
@@ -188,6 +232,7 @@
}
async finish() {
+ _iconToData = undefined; // Unload icon data
ZenWorkspaces.reorganizeTabsAfterWelcome();
await animate('#zen-welcome-page-content', { x: [0, '100%'] }, { bounce: 0 });
document.getElementById('zen-welcome-page-content').remove();
@@ -329,47 +374,47 @@