您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Block unauthorized redirects and prevent history manipulation
The "Stop Nefarious Redirects" Tampermonkey script is designed to block unauthorized redirects and prevent history manipulation on websites. This script helps users maintain control over their browsing experience by ensuring that only trusted URLs can navigate or open new windows, thus protecting against malicious redirections.
window.location.assign
and window.open
methods for later use.window.location.assign
: Overrides the window.location.assign
method to check the destination URL against the whitelist and blacklist before allowing the navigation.window.open
: Overrides the window.open
method to check if the popup's URL is in the whitelist. If not, the popup is blocked.window.location
window.location
to intercept property assignments and handle navigation attempts.window.location
using Object.defineProperty
to ensure it is always used.popstate
events to handle back and forward button navigation. If the destination URL is not allowed, it blocks the navigation and redirects to the last known good URL.history.pushState
and history.replaceState
to prevent history manipulation to blocked URLs.The "Stop Nefarious Redirects" script is a powerful tool to enhance your browsing security by blocking malicious redirects and preventing unauthorized history manipulation. Install this script to take control of your web navigation and protect yourself from nefarious online activities.