Skip to content

Conversation

Copy link

Copilot AI commented Jul 10, 2025

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 blacklist to blocklist
  • Updated error messages to use "blocklist" terminology
  • Updated README.md documentation to use "blocklist" terminology

Backend Implementation

  • Updated default options to use blocklist instead of blacklist
  • Added migration logic in sanitizeOptions() to automatically convert old blacklist values to blocklist
  • Updated offscreen.js to 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 blacklist configurations will have their data automatically migrated to blocklist
  • The migration happens transparently during extension updates
  • No user action required - existing blocked domains continue to work
  • New installations use the modern blocklist terminology

Code Quality

  • Updated content.js to use blocklist parameter and blocklistedHosts variables
  • Updated options.js to 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 blacklist to new blocklist works correctly
  • ✅ Users with both keys prioritize blocklist over legacy blacklist
  • ✅ 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

Options page showing updated "Blocklist" terminology

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.

Co-authored-by: davidparsson <325325+davidparsson@users.noreply.github.com>
Copilot AI changed the title [WIP] Open a pull request that renames "blacklist" to "blocklist", both in the GUI and in the code. Maintain backwards compatibility with options stored in previous versions. Rename "blacklist" to "blocklist" with backward compatibility Jul 10, 2025
Copilot AI requested a review from davidparsson July 10, 2025 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants