链接地址全在【当前/新建】标签页中打开(翻页除外)

控制链接在当前或新标签页打开,分页链接始终在当前页打开// ==/UserScript==

作者
恋恋Sama
日安装量
0
总安装量
2
评分
0 0 0
版本
0.0.4
创建于
2025-09-28
更新于
2025-09-28
大小
2.5 KB
许可证
暂无
适用于
所有网站

该脚本用于控制网页链接的打开方式,可通过脚本菜单在「当前标签打开」和「新标签打开」之间切换。特别优化了分页链接(如包含 /page/数字/ 格式的链接,例如 xxx.com/page/3/ xxx.com/page/4 等)的处理逻辑 —— 此类分页链接会强制在当前标签页打开,避免翻页时频繁新建标签页,提升浏览连贯性。
本脚本基于「稻米鼠」的原创作品《链接地址全在【当前 / 新建】标签页中打开》修改,在保留原脚本核心功能的基础上,新增了对分页链接的特殊处理。

This script is used to control how web page links open. You can switch between "Open in current tab" and "Open in new tab" via the script menu. It specially optimizes the handling of pagination links (such as links in the format /page/number/, e.g., xxx.com/page/3/, xxx.com/page/4, etc.) — this type of pagination link will force open in the current tab, avoiding frequent new tabs when turning pages and improving browsing coherence.
This script is modified based on the original work "Open links in [current/new] tab" by "稻米鼠". On the basis of retaining the core functions of the original script, the special handling logic for pagination links is added.