mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 21:59:59 +02:00
Fix: Update pinned tab entries to include triggering principal
This commit updates the pinned tab entries to include the triggering principal. Previously, the pinned tab entries only included the URL and title of the tab. This caused issues when restoring pinned tabs, as the triggering principal was not being saved. This commit adds the triggering principal to the pinned tab entries, ensuring that they can be restored correctly. This fixes the issue where pinned tabs were not being restored correctly.
This commit is contained in:
parent
7d8dde9269
commit
5e4ea9889c
1 changed files with 6 additions and 3 deletions
|
@ -95,10 +95,13 @@
|
|||
|
||||
_setPinnedAttributes(tab) {
|
||||
const browser = tab.linkedBrowser;
|
||||
const tabState = JSON.parse(SessionStore.getTabState(tab));
|
||||
const activeEntry = tabState.entries[tabState.index - 1];
|
||||
const entry = {
|
||||
url: browser.currentURI.spec,
|
||||
title: tab.label || browser.contentTitle,
|
||||
triggeringPrincipal_base64: lazy.E10SUtils.SERIALIZED_SYSTEMPRINCIPAL
|
||||
};
|
||||
|
||||
tab.setAttribute("zen-pinned-entry", JSON.stringify(activeEntry));
|
||||
tab.setAttribute("zen-pinned-entry", JSON.stringify(entry));
|
||||
tab.setAttribute("zen-pinned-icon", browser.mIconURL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue