您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add rel attribute values on mouseup to block window.opener in the linked site, also blocks referer (2016-09-01)
You may find it troubling that when you follow a link in Tab 1 (Site A) which is targeted to open Site B in a new window or tab, Site B can change the page in Tab 1 from Site A to Site B, or Site C, or whatever it wants.
This script adds two rel attribute values (rel="noopener noreferrer") to such targeted links to limit the potential for that. It does not attempt to clean up uses of window.open(), however.
An unfortunate (?) side effect: Site B cannot tell the source of the referral was Site A. This may break "hotlink protection" or other aspects of authentication on some sites.
To disable this global script on a specific site: Use the Greasemonkey / Tampermonkey user excludes feature to prevent the script from running on the source site (the site with the links you want to work normally).
References:
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址