This UserScript "Blind Eye" automatically redacts predefined sensitive information on webpages, preventing unintended exposure of sensitive details.
When enabled, this script will:
- Instantly overlay the webpage with a translucent layer to obscure the page contents as soon as it starts loading.
- Redact sensitive information based on predefined patterns once the page has finished loading.
- Auto fetches IP, City and state to blacklist
- Install a userscript manager extension like Tampermonkey or Greasemonkey on your browser.
- Create a new userscript and copy-paste the provided script.
- Save the userscript.
You can customize the information you want to hide by modifying the sensitiveInfo
object in the script. The corresponding replacement strings can be customized in the replacementStrings
object.
const sensitiveInfo = {
phoneNumbers: ['123-456-7890', '987-654-3210'],
ipAddresses: [],
emailAddresses: ['[email protected]', '[email protected]'],
usernames: ['jimi.did.it', 'THISSTRINGWILLBEEXCLUDEDIFYOUHAVEITINSTALLED'],
names: ['John Doe', 'Jane Doe', 'John', 'Jane'],
city: [],
state: [],
};
const replacementStrings = {
phoneNumbers: '[email protected]',
ipAddresses: '[email protected]',
emailAddresses: '[email protected]',
usernames: 'REDACTED_USER',
names: 'REDACTED_NAME',
city: 'REDACTED_CITY',
state: 'REDACTED_STATE',
};
Once installed and active, the script will automatically run on all webpages (*:https://*/*
), redacting sensitive information based on the predefined patterns. The page will be obscured by an overlay until the removal of the sensitive information is complete.
- This script runs at
document-start
, ensuring the overlay is displayed as early as possible. - The redaction and overlay removal occur after the
DOMContentLoaded
event to ensure the DOM is available for modification.