First off, thank you for considering contributing to NihongoColor! It's people like you that make open-source tools great.
NihongoColor is entirely data-driven! You can add a new language without changing a single line of JavaScript.
- Create a new JSON file in the
languages/folder (e.g.,languages/thai.json). - Define the
categories,particles,regexRules, andlegend. - Register the new file in
languages/registry.json. - Restart the extension and test it.
Did you spot a missing particle or a wrong color mapping?
- Open
languages/japanese.json(orkorean.json, etc.). - Update the rules, arrays, or tooltips.
- Submit a Pull Request!
If you want to improve the content.js engine (e.g., tweaking the CSS Custom Highlight API implementation or the MutationObserver performance):
- Fork the repo and create your branch from
main. - Make sure you test your changes on heavy websites (like YouTube with subtitles or long Wikipedia articles).
- Ensure no DOM elements are unnecessarily injected to prevent SPA breaks.
- Issue that pull request!
- Clone the repository.
- Open Chrome and navigate to
chrome://extensions/. - Enable Developer mode.
- Click Load unpacked and select the extension folder.
- You can inspect the popup or background scripts using Chrome DevTools.