This commit refactors the pinned tab management code to improve clarity and reduce redundant checks.
The following changes were made:
- Moved pinned tab logic to a dedicated `gZenPinnedTabManager` class.
- Removed unnecessary attribute checks for `zen-pinned-url`, `zen-pinned-title`, and `zen-pinned-icon` as these are now handled by the `gZenPinnedTabManager` class.
- Simplified session restore logic for pinned tabs.
- Updated the pinned tab context menu logic to utilize the `gZenPinnedTabManager` class.
- Removed unnecessary code blocks related to pinned tabs.
These changes improve the overall readability and maintainability of the pinned tab management code.
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.