Managing Rules
Learn how to organize, edit, and maintain your highlight rules.
Accessing Rule Management
To access the rule management interface:
- Click the Live Highlighter icon in your browser toolbar
- Click "Manage Rules" button in the popup
Reordering Rules
Why Order Matters
When text matches multiple rules, only the first matching rule applies. This means rule order determines which highlight appears when there's a conflict.
Example
If you have these rules:
- "production" → Red
- "prod" → Orange
The text "production" will be highlighted in red because it matches the first rule before reaching the second.
How to Reorder
- Open the rule management interface
- Click and hold the drag handle (⋮⋮) next to a rule
- Drag the rule up or down
- Release to drop it in the new position
- Changes are saved automatically
Ordering Strategy
Place more specific rules above more general ones:
Toggling Rules On/Off
Temporarily disable rules without deleting them:
- Open the rule management interface
- Locate the toggle switch next to the rule
- Click to toggle between enabled (on) and disabled (off)
- Disabled rules are grayed out
When to toggle off:
- Testing different highlighting schemes
- Temporarily reducing visual clutter
- Keeping seasonal or context-specific rules
Editing Rules
Currently, to modify a rule:
- Note the text and colour of the existing rule
- Delete the rule
- Create a new rule with the updated settings
Future Enhancement
Direct rule editing is planned for a future release.
Deleting Rules
To permanently remove a rule:
- Open the rule management interface
- Click the delete icon (🗑️) next to the rule
- Confirm the deletion in the popup dialog
No Undo
Deleted rules cannot be recovered. Make sure you don't need the rule before deleting.
Organizing Large Rule Sets
Group by Purpose
Organize rules mentally or with naming conventions:
Cloud Environments:
- "production" → Red
- "staging" → Yellow
- "dev" → Green
Status Messages:
- "ERROR" → Red
- "WARNING" → Orange
- "SUCCESS" → Green
Regular Maintenance
Periodically review your rules:
- Remove rules you no longer use
- Update rules that aren't working as expected
- Reorder rules based on what you need most
Export and Backup
Future Feature
Export/import functionality is planned for a future release. For now, all rules are stored in your browser's local storage.
Performance Considerations
- Live Highlighter is optimized for performance
- No noticeable impact even with many rules
- Highlighting happens instantly as pages load
- Rules work on all frames within a page
Troubleshooting
Rules Not Applying
If a rule isn't working:
- Check if the rule is enabled (toggle should be on)
- Verify the text matches exactly (case-sensitive)
- Check if a higher rule is matching first
- Try refreshing the page
Unexpected Highlights
If text is highlighting unexpectedly:
- Review rule order - a more general rule might be matching first
- Make your rules more specific
- Check for partial matches (e.g., "prod" in "product")
Next Steps
- Learn more about creating effective rules
- Explore use cases for different scenarios