Rename "blacklist" to "blocklist" with backward compatibility
This PR updates the extension to use inclusive terminology by renaming "blacklist" to "blocklist" throughout the codebase while maintaining full backward compatibility with existing user configurations.
Changes Made
User Interface Updates
- Updated options page heading from "Blacklist" to "Blocklist"
- Changed textarea ID from
blacklisttoblocklist - Updated error messages to use "blocklist" terminology
- Updated README.md documentation to use "blocklist" terminology
Backend Implementation
- Updated default options to use
blocklistinstead ofblacklist - Added migration logic in
sanitizeOptions()to automatically convert oldblacklistvalues toblocklist - Updated
offscreen.jsto handle both old and new keys during localStorage conversion from previous extension versions - Updated all internal variable names and function parameters throughout the codebase
- Updated debug messages to use "blocklist" terminology
Backward Compatibility
The migration strategy ensures seamless transition for existing users:
- Users with existing
blacklistconfigurations will have their data automatically migrated toblocklist - The migration happens transparently during extension updates
- No user action required - existing blocked domains continue to work
- New installations use the modern
blocklistterminology
Code Quality
- Updated
content.jsto useblocklistparameter andblocklistedHostsvariables - Updated
options.jsto handle both old and new keys for backward compatibility - All functionality remains identical - only terminology has changed
- Comprehensive testing confirms migration logic works correctly
Testing
- ✅ Migration from old
blacklistto newblocklistworks correctly - ✅ Users with both keys prioritize
blocklistover legacyblacklist - ✅ New users get the default empty
blocklist - ✅ Domain filtering functionality works correctly with new terminology
- ✅ Extension builds successfully with all changes
- ✅ UI displays correctly with updated terminology
Screenshot
The screenshot shows the updated options page with "Blocklist" instead of "Blacklist" in the configuration section.
Impact
This change modernizes the extension's terminology to be more inclusive while ensuring zero disruption to existing users. The backward compatibility layer ensures that all existing configurations continue to work seamlessly.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.