Right-Click to New-Tab 2026 by Sean Hollen
Right-clicking a link opens it in a new tab, at the position a middle-click would have used.
Extension Metadata
About this extension
Right-clicking a link opens it in a new tab, at the position a middle-click would have used.
Why it exists
Extensions that already do this are unreliable in three ways:
How it works
What it deliberately doesn't do
Holding Shift, Ctrl, Alt or Meta while right-clicking, or using the keyboard menu key, shows the normal context menu. The toolbar button turns the extension off or on for the current site.
Results
Every scenario is also run with a native middle-click and no extension. That run is the reference for correct tab order.
69 synthetic edge cases and 11 tab-order scenarios. The pages cover the constructions above: shadow DOM, frames, page scripts that swallow events, SVG/area links, drags, holds and false-positive traps.
| Extension | Edge cases / 69 | Tab order / 11 |
|---|---|---|
| This extension | 69 | 11 |
| Right Click Opens Link New Tab 0.1.1 | 50 | 8 |
| Right Links WE 0.5b12 | 44 | 10 |
| Right Click Opens Link in a Background Tab 1.5 | 42 | 8 |
| Right Click Opens Link New Tab Correct Order 0.0.9 | 40 | 8 |
| Right Click Opens Link New Tab 0.0.7 | 28 | 2 |
Extensions not available for Firefox were ported to run the same tests.
Real sites: 246 out of 246 links worked, across about 35 sites (news, search, shopping, forums, docs, social), picking real links before and after scrolling. "Worked" means exactly one new tab, with the link's URL, no context menu, and the source page unchanged.
Page cost: on a page with 3,000 links and 300 consecutive DOM changes, the measured time was 1222–1234 ms, against 1235 ms with no extension. The two extensions that rescan the page on every change took about 3600 ms.
Known limitations
Why it exists
Extensions that already do this are unreliable in three ways:
- They miss links. On many sites the right-click falls through to the normal context menu and no tab opens. The causes were the same across extensions:
- attaching listeners late (
document_idle) or only when the page changes; - listening for
mousedown/mouseup, which never fire when a page callspreventDefault()onpointerdown(carousels, sliders, drag libraries); - listening at a point the page can stop first (
stopPropagationin a window capture listener); - not handling shadow DOM, SVG links,
<area>, srcdoc iframes or pages that calldocument.open(). - They put tabs in the wrong place. Several use
index: current + 1, so clicking links 1, 2, 3 gives tabs in the order 3, 2, 1. Others ignore what the browser does after you switch tabs, close a child tab or middle-click between right-clicks. Most open into the wrong window when another window has focus. - They fire on things that aren't links. Some open a tab for
href="#", images or canvases, or for a link that sits under the element you clicked. Some open two tabs for nested links, or open a tab after a right-button drag.
How it works
- Content script, injected at
document_startinto every frame, includingabout:blankand srcdoc frames: - Window capture listeners for
pointerdown,contextmenuandpointerup. They are registered before any page script, so the page can't block them. Pointer events still fire when the page cancels mouse events. - On press, it finds the link under the cursor by walking the flattened tree: into open and closed shadow roots (
event.originalTarget,openOrClosedShadowRoot), through slots, and out viaShadowRoot.host. Only<a href>,<area href>and SVGhref/xlink:hreflinks with anhttp(s)URL count. - It cancels
contextmenuonly for those links. This works whether the menu event fires on press (Linux, macOS) or on release (Windows). - On release, it opens the tab unless the pointer moved more than 6 px in any direction or a modifier key is held. The URL is read at release, as a middle-click would, so links whose href is rewritten on press are honoured. If the page removed the link meanwhile, the URL from the press is used.
- A
MutationObserverondocumentre-adds the listeners afterdocument.open()wipes them. - Background script creates tabs one at a time, in click order:
openerTabIdis set and no index is given, so Firefox positions the tab with its own middle-click rule. That rule covers placing tabs after earlier tabs opened from the same page, resetting when you switch tabs, and tab groups.cookieStoreIdis passed through, so the tab opens in the same container as the page.
What it deliberately doesn't do
- No tab for anything without a URL:
<button>,role="link",href="#",javascript:/mailto:/data:links, images, canvases, or links inside editable areas. These keep their normal right-click behaviour. - No telemetry, remote configuration or network requests. Permissions are
storage, pluscookiesto open tabs in the right container. There are no host permissions beyond the content script match. - No work outside the right button. Other clicks return at the first check, and nothing scans or tags links on the page.
Holding Shift, Ctrl, Alt or Meta while right-clicking, or using the keyboard menu key, shows the normal context menu. The toolbar button turns the extension off or on for the current site.
Results
Every scenario is also run with a native middle-click and no extension. That run is the reference for correct tab order.
69 synthetic edge cases and 11 tab-order scenarios. The pages cover the constructions above: shadow DOM, frames, page scripts that swallow events, SVG/area links, drags, holds and false-positive traps.
| Extension | Edge cases / 69 | Tab order / 11 |
|---|---|---|
| This extension | 69 | 11 |
| Right Click Opens Link New Tab 0.1.1 | 50 | 8 |
| Right Links WE 0.5b12 | 44 | 10 |
| Right Click Opens Link in a Background Tab 1.5 | 42 | 8 |
| Right Click Opens Link New Tab Correct Order 0.0.9 | 40 | 8 |
| Right Click Opens Link New Tab 0.0.7 | 28 | 2 |
Extensions not available for Firefox were ported to run the same tests.
Real sites: 246 out of 246 links worked, across about 35 sites (news, search, shopping, forums, docs, social), picking real links before and after scrolling. "Worked" means exactly one new tab, with the link's URL, no context menu, and the source page unchanged.
Page cost: on a page with 3,000 links and 300 consecutive DOM changes, the measured time was 1222–1234 ms, against 1235 ms with no extension. The two extensions that rescan the page on every change took about 3600 ms.
Known limitations
- It can't run where Firefox blocks extensions: the PDF viewer, Reader View and
about:pages. - Opened tabs carry no referrer. The tab-creation API can't set one.
- It can't hide the menu if
dom.event.contextmenu.enabledis false. That setting stops pages and extensions from suppressing the context menu, so the menu still appears. - Pseudo-links have no URL. Buttons and
divs that navigate through JavaScript keep the normal right-click.
Rated 0 by 0 reviewers
Permissions and data
Required permissions:
- Access your data for all websites
Data collection:
- The developer says this extension doesn't require data collection.
More information
- Add-on Links
- Version
- 1.2.0
- Size
- 16.07 KB
- Last updated
- 8 days ago (Oct 4, 2026)
- Related Categories
- License
- MIT License
- Version History
- Add to collection