- Features
- Screenshots
- Using this extension
- Default Rules
- Managing Rules
- Customizing Appearance
- Importing and Exporting Rules
- How It Works
- Privacy and Security
- About me
- License
- Real-time monitoring of chat input for potentially sensitive information
- Customizable content rules with support for:
- String Match: Simple text matching with case sensitivity option
- Regular Expression: Advanced pattern matching
- Variable Assignment: Specifically detect sensitive data in variable assignments
- Visual highlighting of detected sensitive information with:
- Modern dispersed glowing border effect
- Customizable colors and intensity
- Smooth transitions and animations
- Dynamic rule counter showing total number of active rules
- Detailed warning tooltip showing:
- Rule that detected the content
- Detected sensitive text
- Position of the detected content (line and character)
- Interactive position markers for quick navigation
- Built-in default rules for common sensitive data types:
- Credit Card Numbers (with flexible format matching)
- Email Addresses
- Social Security Numbers (SSN)
- Secret Variable Assignments (password, secret, key, token)
- Confidential References
- Secret References
- Complete rule management system:
- Add, edit, delete individual rules
- Bulk delete all rules with confirmation
- Enable/disable individual rules
- Real-time regex validation
- Rule counter in section headers
- Customizable appearance settings:
- Highlight color with glow effect
- Border width options
- Warning header color
- Menu button visibility toggle
- Customizable keyboard shortcut (default: Shift+Alt+P)
- Menu icon placement options
- Import/export functionality using TSV format for easy rule sharing
- Local storage of configurations with reasonable defaults
- Non-intrusive UI that integrates seamlessly with the TypingMind interface
- Load
https://itcon-pty-au.github.io/typingmind-contentshield/contentshield.js
into Menu > Preferences > Extension in TypingMind. - A new "Shield" button will appear in the TypingMind sidebar.
- Click on the Shield button to access the configuration panel where you can:
- Enable/disable ContentShield
- Manage content rules (with rule count display)
- Customize appearance settings
- Import/export rule configurations
- Alternatively, you can use the keyboard shortcut (default: Shift+Alt+P) to open the configuration panel.
The extension comes with six predefined rules to detect common types of sensitive information:
-
Credit Card Number (Regular Expression)
- Detects sequences of 13-16 digits with optional spaces or dashes
- Pattern:
\b(?:\d[ -]*?){13,16}\b
-
Email Address (Regular Expression)
- Detects standard email address formats
- Pattern:
\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b
-
SSN (Regular Expression)
- Detects Social Security Number patterns (xxx-xx-xxxx format)
- Pattern:
\b(?:\d{3}[-.]?){2}\d{4}\b
- Supports optional dots or dashes as separators
-
Secret Variable (Variable Assignment)
- Detects assignments to sensitive variables
- Pattern:
(password|secret|key|token)\s*=\s*["']([^"']+)["']
- Matches variable names containing: password, secret, key, token
-
Confidential Reference (String Match)
- Simple case-insensitive match for "confidential"
- Non-regex, exact text match
-
Secret Reference (String Match)
- Simple case-insensitive match for "secret"
- Non-regex, exact text match
- Open the ContentShield configuration panel
- Click "Add Rule"
- Provide the following details:
- Rule Name - A descriptive name for the rule
- Rule Type - Choose between:
- "String Match" - Simple text matching with case sensitivity option
- "Regular Expression" - Advanced pattern matching
- "Variable Assignment" - Detect sensitive data in variable assignments
- Pattern - The text pattern to detect
- Case Sensitive (for String Match only) - Toggle if the match should be case-sensitive
- Click the edit (pencil) icon next to any rule
- Modify the rule details in the editor
- Click "Save" to apply changes
- Individual rule: Click the delete (trash) icon next to any rule
- All rules: Click "Delete All" button and confirm the action
- A confirmation dialog will suggest exporting rules as backup
- The rules counter will update automatically
Toggle the checkbox next to any rule to enable or disable it without deleting it.
- Open the ContentShield configuration panel
- Click "Show" in the Appearance section
- Adjust:
- Highlight Color - The color used for the glowing border effect
- Border Width - Choose from Thin (1px) to Very Thick (4px)
- Warning Header Color - The background color for the warning header
- Menu & Keyboard Controls:
- Hide extension from menu - Option to remove the ContentShield button from the sidebar
- Keyboard Shortcut - Set a custom keyboard combination to open the panel (required if extension is hidden from menu)
- Menu Icon Placement - Choose where to position the ContentShield button in the sidebar
- Click "Save Styles" to apply changes
- Click the "Export" button in the ContentShield configuration panel
- A TSV (Tab-Separated Values) file containing your rules will be downloaded
- The TSV format includes: id, type, pattern, name, active status, description, and case sensitivity
- Click the "Import" button in the ContentShield configuration panel
- Select a TSV file containing rules (Here is a comprehensive rule set for importing )
- The system will:
- Validate all rules (especially regex patterns)
- Skip any invalid rules
- Add new rules that don't conflict with existing ones
- Show a summary of added and skipped rules
The extension monitors chat input in real-time, scanning for patterns defined in your active rules. When sensitive information is detected:
- The chat input field is highlighted with a glowing border effect that:
- Uses multiple layers of box shadows for depth
- Includes an inner glow effect
- Animates smoothly on appearance/disappearance
- A detailed tooltip appears showing:
- Which rules were triggered
- The detected sensitive text
- The location (line and character position) of each match
- Clicking on a position indicator will:
- Focus the input field
- Select the relevant text
- Scroll smoothly to bring the text into view
This visual feedback helps you identify sensitive information before sending your messages.
- All processing is done entirely client-side
- No data is sent to any server
- Your configurations are stored only in your browser's local storage
- The extension has no external dependencies
I am a passionate developer dedicated to creating useful tools that can benefit the community. My goal is to distribute all of my projects as open source, enabling others to learn, contribute, and innovate together. If you appreciate my work and want to support my efforts, feel free to buy me a coffee ❤️!
This project is licensed under the MIT License - see the LICENSE file for details.