Skip to content

FR: Open link to next window context menu #23

@Aziks0

Description

@Aziks0

I use the tab-stash extension with the tab always pinned on my main window, but I very often find myself wanting to open a link in a secondary window. Currently, I have to open the link in the current window, and then either use my shortcut to move the tab or use the context menu. A new context menu button, on links, that opens directly the link in the next window would be very useful for this.

A simple and dirty way to do this with the current implementation would be to:

  1. Open the link in a new tab, on the current window
  2. Move the tab to the next window

Something like this:

browser.menus.create({
  contexts: ["link"],
  title: "Open Link in next window",
  onclick: (link, _tab) =>
    browser.tabs
      .create({ active: false, url: link.linkUrl })
      .then((tab) => tabMover.moveTabOrHighlightedTabs(tab)),
});

But maybe with the tab being set to be the active one? I'm not sure. The "Open Link in New Window" button opens the tab in a new window and focuses it. So it's maybe best to keep it consistent with the browser behavior.

Another way to do it, which would require way more code and/or probably some refactoring of the moveTab() method, would be to directly open the tab in the next window using browser.tabs.create() windowId property.

Either way, I would love to have a feature like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions