Force New Tab EN
SurgWaterfox · Firefox
Opens JavaScript driven buttons in new tabs like standard html links.
<all_urls>),意味着它可以读取你在任意站点的页面内容,包括已登录的页面。这是许多扩展正常工作的必要条件,但也值得你确认来源可信。
截图
简介
Force New Tab
A Firefox extension that forces middle-click on any element to open in a new tab — including JavaScript-driven buttons, cards, and links that normally ignore middle click.
The Problem
Modern websites are often built as Single Page Applications (SPAs) using frameworks like React, Vue, and Angular. Navigation on these sites is handled entirely by JavaScript rather than standard <a href> links. As a result, middle-clicking elements like cards, buttons, and tiles either does nothing or navigates the current tab instead of opening a new one. Force New Tab solves this transparently, without breaking normal browser behaviour.
How It Works
When you middle-click an element, the extension works through a chain of fallbacks in order, stopping as soon as it finds a URL to open:
Real links are ignored — if the clicked element is a genuine <a href> link, the extension does nothing and lets the browser handle it natively. (Opens in new tab by default.)
data-* attribute scan — checks the clicked element and its ancestors for common URL attributes like data-href, data-url, data-link, data-navigate etc.
Child anchor search — searches inside the card container for any <a href> link. Useful for sites like Spotify where the image and text are separate elements inside the same card, but only the text has a real link.
Page world hooks — intercepts standard JavaScript navigation methods:
window.open
history.pushState
history.replaceState
location.href
location.assign
location.replace
Click replay — if nothing is captured after 500ms, the extension re-fires mousedown, mouseup, and click events on the element to trigger its JavaScript handler, then intercepts the resulting navigation.
URL polling — as a last resort, monitors window.location.href for changes after the click replay fires. If the URL changes, the new URL is opened in a new tab and the current tab is snapped back to its original URL.
Compatibility
The extension is designed to work on as many sites as possible. Tested on:
Site Status Method used
YouTube ✅ Works Page world hooks
Reddit ✅ Works Page world hooks
Twitter / X ✅ Works Page world hooks
Spotify ✅ Works Child anchor search
GitHub ✅ Works Real links / page world hooks
Twitch ✅ Works Page world hooks
Pinterest (cards) ✅ Works Child anchor search
Pinterest (filter buttons) ⚠️ Partial URL polling — current tab also navigates, use back button to restore
Known Limitations
Strict CSP sites — some sites (like Pinterest) block page-world script injection via Content Security Policy. The extension degrades gracefully, falling back to DOM-based methods that don't require page-world access.
Modal/dialog triggers — buttons that open dialogs rather than navigating to a new page have no URL to open. The extension correctly does nothing in these cases.
Internal framework routers — some sites use heavily customised internal routers (like Spotify's) that bypass all standard navigation methods. The child anchor search and click replay fallbacks handle most of these cases.
Permissions
The extension requests the following permissions:
tabs — required to open URLs in new background tabs
No data is collected, stored, or transmitted. The extension has no network access and makes no external requests. All processing happens locally in your browser.
Version History
v1.3.0
Added URL polling fallback for sites that bypass all JavaScript hooks
Added child anchor search for Spotify-style card components
Added history.replaceState interception
v1.2.0
Added location.href, location.assign, and location.replace interception
Added click replay fallback
v1.1.0
window.open, history.pushState interception
Real link passthrough
data-* attribute fallback
v1.0.0
Initial public release
License
MIT
Force New Tab 是做什么的
Force New Tab 是一款面向 Firefox 的实用工具类扩展,主要用来解决浏览器里某类具体的小问题。官方对它的介绍是:Opens JavaScript driven buttons in new tabs like standard html links.在Firefox 附加组件商店(AMO)上,它当前版本 1.3.0,评分 3.5(2 人评价),约 47 名用户。
适合什么人用
从功能定位看,Force New Tab 更适合想补上浏览器原生缺失功能的用户。如果你平时只是偶尔遇到相关需求,用浏览器自带功能也能凑合;但如果这件事每天都发生,装一个专门处理它的扩展通常比手动操作省事得多。需要注意的是它作用于所有网站,装上后建议先观察一两天,确认不影响常用站点的正常使用。
怎么安装 Force New Tab
- 打开Firefox 附加组件商店(AMO)上的官方页面;
- 点「添加到浏览器」并确认权限提示;
- 装好后在扩展列表里固定图标,方便随时开关。
本站只做索引与介绍,安装包来自官方商店。如果商店页面提示当前地区不可用,说明该扩展未在你所在区域上架。
常见问题
Force New Tab 是免费的吗?
Force New Tab 在Firefox 附加组件商店(AMO)免费提供下载。它是浏览器扩展,装上就能直接用,不需要注册账号。
Force New Tab 安全吗?
它只申请了 0 项权限,范围比较克制,没有申请「读取所有网站数据」这种大权限。
Force New Tab 支持哪些浏览器?
当前收录的版本来自Firefox 附加组件商店(AMO),适用于 Firefox。同一个扩展在其他商店可能有对应版本,但功能与版本号不一定相同。
怎么卸载 Force New Tab?
在扩展管理页找到 Force New Tab,点移除即可。它在本地保存的设置会一起清掉,不会残留数据。
权限清单 来自 manifest.json 原文
站点访问 1
<all_urls>
接口权限 1
tabs
