mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-09 11:26:44 +00:00
feat(pinned-tab-manager): Add restore pinned tabs to pinned url option
This commit introduces a new option to the pinned tab manager that allows users to restore pinned tabs to their pinned URL and title, even if the current tab has a different URL. - Adds a new preference `zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url` to control this behavior. - Updates the tab browser, tab state, and preferences code to support the new option. - Adds a new UI element in the settings to allow users to enable/disable this feature. This feature enhances the pinned tab manager by providing more control over how pinned tabs are restored when the browser is restarted.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
|
||||
index 26f5671c849d9b0a126d79b07bc7d3d7870826ec..3726c8d89c9a8f797fda4ef3c18e4fa81f3ad130 100644
|
||||
index 26f5671c849d9b0a126d79b07bc7d3d7870826ec..5e356a35639c802fcf6d95d42993d5bd5cda514a 100644
|
||||
--- a/browser/components/sessionstore/TabState.sys.mjs
|
||||
+++ b/browser/components/sessionstore/TabState.sys.mjs
|
||||
@@ -98,6 +98,11 @@ var TabStateInternal = {
|
||||
@@ -98,6 +98,12 @@ var TabStateInternal = {
|
||||
tabData.muteReason = tab.muteReason;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ index 26f5671c849d9b0a126d79b07bc7d3d7870826ec..3726c8d89c9a8f797fda4ef3c18e4fa8
|
||||
+ tabData.zenDefaultUserContextId = tab.getAttribute("zenDefaultUserContextId");
|
||||
+ tabData.zenPinnedUrl = tab.getAttribute("zen-pinned-url");
|
||||
+ tabData.zenPinnedTitle = tab.getAttribute("zen-pinned-title");
|
||||
+ tabData.zenPinnedIcon = tab.getAttribute("zen-pinned-icon");
|
||||
+
|
||||
tabData.searchMode = tab.ownerGlobal.gURLBar.getSearchMode(browser, true);
|
||||
|
||||
|
Reference in New Issue
Block a user