Thank you for your interest in contributing to BlockMaster! This document provides guidelines and instructions for contributing.
This project follows a standard code of conduct:
- Be respectful and inclusive
- Focus on constructive feedback
- Accept that different viewpoints exist
If you find a bug, please create an issue with:
- A clear, descriptive title
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Chrome version and OS
- Screenshots if applicable
Feature requests are welcome! Please:
- Check if the feature has already been suggested
- Explain the use case and why it would be useful
- Provide examples of how it would work
- Fork the repository
- Create a new branch:
git checkout -b feature/my-featureorgit checkout -b fix/bug-description - Make your changes
- Test thoroughly on X/Twitter
- Commit with clear messages:
git commit -m "Add feature: description" - Push to your fork:
git push origin feature/my-feature - Open a Pull Request with:
- Clear description of changes
- Screenshots/gifs if UI changes
- Testing notes
- Chrome or Chromium browser
- Basic knowledge of JavaScript and Chrome Extensions
# Clone your fork
git clone https://github.com/YOUR_USERNAME/blockmaster.git
cd blockmaster
# Load in Chrome:
# 1. Open chrome://extensions/
# 2. Enable Developer mode
# 3. Click "Load unpacked"
# 4. Select this folder- Edit files in your favorite editor
- Changes to
content.jsorstyles.cssrequire page refresh to see - Changes to
manifest.jsonrequire extension reload in chrome://extensions/
- Button appears on posts with analytics
- Clicking "block" shows confirmation (if enabled)
- Processing state shows "..."
- Success shows "blocked" and toast notification
- Post is removed from timeline
- Rate limiting is handled gracefully
- Settings popup works correctly
- Session stats update correctly
- Use single quotes for strings
- Use 2-space indentation
- Use camelCase for variables and functions
- Use UPPER_CASE for constants
- Add comments for complex logic
- Prefer
constandletovervar
Example:
const CONFIG = {
DEBUG: false,
SELECTORS: {
article: 'article[data-testid="tweet"]',
},
};
function getUsername(element) {
// Extract username from post element
const link = element.querySelector('a');
return link?.textContent || null;
}- Use kebab-case for class names
- Prefix all classes with
blockmaster-to avoid conflicts - Use
!importantsparingly and only when overriding X's styles - Group related styles together
- Better username extraction (X changes their DOM frequently)
- Support for X's new layout changes
- Keyboard shortcuts (e.g., press 'B' to block current post)
- Bulk block functionality
- Block list import/export
- Statistics dashboard
- Support for additional languages
- Dark/light theme toggle
- Custom button colors
- Animation speed settings
Feel free to open an issue for any questions about contributing.
By contributing, you agree that your contributions will be licensed under the MIT License.