Thank you for your interest in contributing to CF-TopHacker! This guide will help you set up the development environment and understand the contribution process.
- Git installed on your machine
- Google Chrome browser
- A GitHub account
- Fork the repository by clicking the 'Fork' button at CF-TopHacker
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/CF-TopHacker.git
cd CF-TopHacker
- Add the upstream repository as a remote:
git remote add upstream https://github.com/rahulharpal1603/CF-TopHacker.git
- Ensure you're on the main branch:
git checkout main
- Create and switch to a new branch:
git checkout -b feature/your-feature-name
Use descriptive branch names like feature/add-sorting
or fix/popup-layout
.
- Open Chrome and go to
chrome://extensions/
- Enable "Developer mode" using the toggle in the top right
- Click "Load unpacked"
- Select the
src
directory from the cloned repository folder.
-
After modifying code:
- Click the refresh icon (🔄) next to the extension in
chrome://extensions/
- Click the refresh icon (🔄) next to the extension in
-
Testing Guidelines:
- Test on a Codeforces contest page
- Ensure popup renders properly
- Check the Chrome DevTools console for any errors
- Follow JavaScript best practices
- Keep code modular and reusable
- Comment complex logic
- Use meaningful variable names related to Codeforces terminology
- Commit your changes:
git add .
git commit -m "Description of changes"
- Push to your fork:
git push origin feature/your-feature-name
- Create a Pull Request:
- Go to CF-TopHacker
- Click "New Pull Request"
- Choose your fork and branch
- Include in your PR:
- Description of changes
- Screenshots of the extension in action
- Any related Codeforces features/pages affected
- Testing performed
- Maintainers will review your PR
- Make any requested changes
- Once approved, your PR will be merged
Regularly sync your fork with the upstream repository:
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
If you encounter issues:
- Verify the extension is loaded correctly in
chrome://extensions/
- Check the Console in Chrome DevTools for errors
- Ensure you're testing on Codeforces pages
- Try clearing Chrome's cache and reloading the extension
Before working on new features:
- Open an issue to discuss the feature
- Include use cases and benefits for Codeforces users
- Wait for maintainer approval before starting work
- Open an issue in the repository
- Provide:
- Description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Chrome version and OS
Thank you for contributing to CF-TopHacker!