piroor / copy-selected-tabs-to-clipboard

Provides ability to copy title and URL of selected tabs to the clipboard for Firefox 63 and later.
Other
84 stars 16 forks source link

[Feature Request] Support addons similar to `Tree Style Tab` by reading the `openerTabId` #45

Closed Lej77 closed 1 year ago

Lej77 commented 1 year ago

Short description

The openerTabId property on tabs seem to be updated by both Tree Style Tab and Sidebery. So it should be possible to read tree structure from it instead of how its currently implemented (by using TST's API). If using TST's API is better in some ways then there could be a fallback that uses openerTabId if TST isn't installed/enabled.

One issue with openerTabId seems to be that if multiple addons want to control it then the tree structure could be a bit unexpected. This seems quite unlikely though since that would also mean the user would have different tree structures in the different addons. One way this could happen is if a user had both TST and Sidebery installed but only used on of them. In that case I am unused which addon would set the openerTabId when the browser session is restored and that could lead to some issues. (In which case using TST's API could be better since it would at least get a consistent picture of the tree structure.)

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install Copy Selected Tabs to Clipboard.
  3. Install an extension that supports tree structure for tabs like Sidebery.
    • Do not install Tree Style Tab since that has explicit support.
  4. Select a tree of tabs and copy using Markdown (List).

Expected result

The copied tab titles and URLs should be indented based on their tree level.

Actual result

The copied list is flat with no indentation.