web-archives
web-archives copied to clipboard
Properly set `openerTabId` on new tabs
Is your feature request related to a problem? Please describe.
When new tabs are opened by the extension, they are not linked to the originating tab due to not having the openerTabId
property passed to browser.tabs.create()
.
This somewhat confuses tab management extensions such as Tree Style Tab causing them to possibly insert the tab into suboptimal positions.
Describe the solution you'd like
When opening new tabs, the openerTabId
should preferably be set to the originating tab ID, retrieved from eg. (await browser.tabs.query({active: true, currentWindow: true}))[0]?.id
.
Additional context
I'm willing to work on a pull request if this sounds fine. Hints where to modify the code are appreciated.