Greasy Fork is available in English.
阻止某些网站www.example.com、xfuliji.com 自动打开新标签页和弹出窗口, 请在脚本设置中新增用户匹配的网址或编辑源代码@match中新增填写需要阻止的域名或匹配正则表达式 Block some websites www.example.com, xfuliji.com automatically open new tabs and popup windows, please add the user match URL in the script settings or edit the source code @match to fill in the domain name to be blocked or match the regular expression
阻止某些网站www.example.com 自动打开新标签页和弹出窗口, 请在脚本设置中新增用户匹配的网址或编辑源代码@match中新增填写需要阻止的域名或匹配正则表达式
Block some websites www.example.com, xfuliji.com automatically open new tabs and popup windows, please add the user match URL in the script settings or edit the source code @match to fill in the domain name to be blocked or match the regular expression
脚本功能说明:
重写 window.open 方法
完全禁用通过 JavaScript 打开新窗口/标签页的功能
拦截左键点击事件
阻止中键点击
防止用户通过鼠标中键强制打开新标签页
MutationObserver 监听
提前执行机制
通过 @run-at document-start 确保脚本在页面加载初期就生效
注意事项: