Contribute
NerdTip
Hover over jargon, get a plain-English definition.
- JavaScript
- WebExtensions
- Manifest V3
No tagged issues yet. Open one!
NerdTip is plain JavaScript, HTML and CSS with no bundler, so the files in the repo are exactly what the browser runs. You can go from clone to a working change in minutes, and you don't need to write code at all to help: better definitions and new glossaries are just as valuable.
Ways to help
- Sharpen definitions that are inaccurate, unclear or too long.
- Add terms or a whole glossary for a subject NerdTip doesn't cover yet.
- Report bugs, especially sites where the layout breaks or everyday words get highlighted.
- Take a roadmap item: tooltips on keyboard focus, scanning inside iframes and shadow DOM, rescanning text that changes in place, or a dictionary fallback for unknown words.
Set up
git clone https://github.com/SUD747/NerdTip && cd NerdTip
npm install # only copies webextension-polyfill into vendor/
npm testYou need Node.js 18 or newer. After npm install, the repo root is a loadable extension:
- Chrome, Edge or Brave: open
chrome://extensions, turn on Developer mode, choose Load unpacked, and pick the repo root. - Firefox 140+: open
about:debugging#/runtime/this-firefox, choose Load Temporary Add-on, and pickmanifest.json.
After each change, reload the extension and refresh the tab.
Writing glossary entries
Each glossary is a flat JSON file in glossary/ that maps a term to its definition. Good entries follow a few rules:
- One or two plain-language sentences, ideally under 200 characters.
- Expand acronyms first, then explain what the term means.
- Casing controls matching:
GPUin capitals matches only that casing,inferencein lowercase matches anywhere. - Avoid everyday words like “interest” or “stroke”. Prefer specific phrases like “compound interest”.
- A term can appear only once across all glossaries.
npm testchecks this. - Keep it factual and neutral, and write it in your own words.
For a new subject, create glossary/<subject>-terms.json, register it in src/shared/settings.js, and add it to the README table. The glossary id is stored in user settings, so it can't change once released.
How the code fits together
- There's no background script, only content scripts, so one
manifest.jsonworks in every browser. - Extension APIs go through
browser.*via webextension-polyfill. Don't callchrome.*directly. - Content scripts aren't modules. They share one scope and load in the order listed in
manifest.json, so new files go there too. matcher.jsis pure matching logic with no DOM, which is why it's unit-tested under Node.scanner.jswalks the page andtooltip.jsdraws the hover card.
Code guidelines
- Security: never put glossary text, custom terms or page content into
innerHTML. UsetextContent. - Performance: the content script runs on every page, so batch DOM changes and keep per-node work cheap.
- Privacy: anything that sends data off the device must update
PRIVACY.mdin the same PR. - Dependencies: no frameworks or new runtime dependencies without discussing it in an issue first.
- Style: 2-space indentation, single quotes, semicolons, small focused functions.
Before you open a PR
npm test
npm run build && npx web-ext lint --source-dir dist/firefoxThen test by hand in one Chromium browser and in Firefox. Terms should highlight and tooltips should appear, the per-site switch should work, glossary and custom-term changes should apply without a reload, and the console should be clean.
Keep each PR to one glossary or one fix, and include screenshots for UI changes. When reporting a bug, include your browser and NerdTip versions, the page URL, what you expected versus what happened, and any console errors.
Want every detail? Read the full CONTRIBUTING.md on GitHub
Not a coder, or short on time? You can support NerdTip another way: Buy me a coffee