- Personal browser userscripts (Tampermonkey/Greasemonkey), public repo
- Primary docs:
README.md(overview only),docs/(details),docs/TODO.md(todos/issues) - All docs must be kept up-to-date — outdated docs are worse than no docs
/ repo root
*.user.js userscripts
lib/ shared libs (cblib.* under review — see docs/TODO.md)
docs/ project-wide documentation
TODO.md todos, ideas, known issues (internal dev use)
DEV.md dev setup / release process (only if needed)
{script-name}/ per-script docs (README.md, TODO.md — only if substantial)
dev/ dev utilities, not for production
docs/template.user.js template for new scripts
README.md general overview only; link to docs/ for details
- Use
docs/template.user.jsfor all new scripts - When reviewing existing scripts, compare metadata against the template (it may be newer)
README.md= overview only; link todocs/{script-name}/README.mdfor script detailsTODO.mduses- [ ]checkboxes;strikethrough+ check when done; remove fully resolved sections (git history preserves them)- Create
docs/{script-name}/subdirs only when per-script docs become substantial - Prefer updating existing docs over creating new files
- Format:
YYYY-MM-DD(e.g.2025-12-24) - Add time suffix
YYYY-MM-DDTHHmmssonly if multiple releases in one day - Version = date of last functional change; new scripts use creation date
- Functional metadata (bump version):
@match,@include,@exclude,@grant,@require,@resource,@run-at— these affect script behavior or permissions - Non-functional metadata (no bump needed):
@name,@description,@author,@namespace,@icon,@license,@homepage
- Scripts with no functional changes in 3+ years are flagged in
README.mdwith a compatibility warning - Flagged scripts have a corresponding
docs/TODO.mdentry to verify/update/remove
- Prefer native browser APIs and modern JS — avoid adding new external lib dependencies
- Do not add jQuery, underscore, or
waitForKeyElementsto new or updated scripts - Use
MutationObserverinstead ofwaitForKeyElements lib/cblib.*is under review — checkdocs/TODO.mdbefore using it in new scripts
- Modern JS: ES2020+,
const/let, arrow functions, template literals, optional chaining - Formatter: Prettier (
.prettierrcat repo root) —formatOnSaveauto-applies in VSCode - Linter: ESLint (
eslint.config.mjs) — runnpm run lintbefore committing; fix all errors - Comments only where logic isn't self-evident — no noise
- Consistent patterns across scripts: observer setup, GM settings access, error handling
- Consider that
source.fixAll: alwaysmay be set in VSCode global settings — usingdbaeumer.vscode-eslintto activate auto-fix on save