Files
diff-highlighter/src/settings.ts
Tilo Klarenbeek 314c34fe52 Initial commit: Diff Highlighter Chrome extension (MV3, TypeScript)
Highlights .diff/.patch files inline — additions green, deletions red,
hunk/file headers styled, with toggleable highlight.js syntax highlighting.

- MV3, content script gated on text/plain + URL ending in .diff/.patch
- Two-phase render: instant diff colors, then chunked idle-time syntax
- Popup switches + Alt+D shortcut, persisted in chrome.storage.sync, live re-render
- Light/dark via prefers-color-scheme; only the `storage` permission
- TypeScript + esbuild build; Forgejo Actions CI (typecheck + build)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 13:01:06 +02:00

13 lines
342 B
TypeScript

/** User-facing toggles, persisted in chrome.storage.sync. */
export interface Settings {
/** Master switch for the green/red diff layer. */
enabled: boolean;
/** Layer language-aware syntax highlighting on top of the diff colors. */
syntax: boolean;
}
export const DEFAULT_SETTINGS: Settings = {
enabled: true,
syntax: true,
};