Prompt On New Tab

Display a confirmation dialog when the site wants to open a new tab, so that user has the chance to cancel or allow it to open in a new or current tab. This script won't work if the user opens a link in a new tab using web browser's "Open in a new tab", "Open in background tab", or similar which are web browser internal or browser extension features.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
jcunews
日安装量
0
总安装量
171
评分
4 0 0
版本
1.2.19
创建于
2018-02-12
更新于
2020-02-01
大小
7.6 KB
许可证
GNU AGPLv3
适用于
所有网站

The rejectList and allowList contains the list of source-target rules. The main purpose of these lists is to provide an automated action on whether opening a new tab is allowed or not. Any matching rejectList rule will reject the new tab to open without prompting the user. Any matching allowList rule will allow the new tab to open without prompting the user.

rejectList has higher priority than allowList. Each source-target rule is an array of two values: SourceURL then TargetURL. SourceURL denotes the current tab's URL, while TargetURL denotes the new tab's URL.

Both source and target URL values can be either a string type or a regular expression object. Each will be compared against the whole URL.

If string type is used, it must match the whole URL instead of part of it. The comparison is done without case sensitivity (i.e. character case is ignored). A * wildcard can be used to match any one or more characters. e.g.:

If regular expression object is used, it may match only part of the whole URL, depending on the regular expression pattern itself. The comparison is done with or without case sensitivity, depending on the regular expression flags.

A source-target rule will match if the source and target URLs matches.