CodeLedger v1.1.0
See CHANGELOG.md for full details.
[1.1.0] — 2026-05-07
Added
- Syntax highlighting in the Code tab of ProblemModal — regex-based tokenizer for Python, JavaScript, TypeScript, Java, C++, C, Go, Rust, Kotlin, Swift; keywords in blue, strings in green, comments in gray, numbers in amber, types in purple.
src/lib/syntax-highlight.js— new module withhighlightCode(code, lang)andcleanCode(code)helpers; no external dependencies, works inside the extension's strict CSP.- Mermaid diagram rendering via mermaid.ink — renders diagrams as images without loading external scripts (previously blocked by extension CSP). Includes a "View in Mermaid Live" fallback link.
- Vertical-first Mermaid layout — flowcharts and graph diagrams without an explicit direction, or with LR/RL, are automatically rewritten to TD (top-down) for more readable AI-generated diagrams.
- Extension handshake v2 —
presence-marker.jsnow dispatches aCODELEDGER_HANDSHAKECustomEvent (in addition to the existing DOM marker) carrying the browser-specificchrome-extension:///moz-extension://library URL. Works on Chrome, Edge, Brave, and Firefox. - Session-persistent install detection —
landing.jscaches the handshake insessionStorageto avoid the "flash of install link" on page refresh. - Firefox + all Chromium support for the handshake:
presence-marker.jsusesbrowser.*when available, falls back tochrome.*. AICommandPalettescroll — pressing ArrowDown/ArrowUp now scrolls the active item into view inside the dropdown list.- Landing page improvements
- Browser badges (Chrome/Brave/Edge, Firefox, GitHub Releases) dynamically linked from
config.json - FAQ section (8 questions covering privacy, AI, platforms, BYOK)
- Stats strip (platforms, AI providers, servers that see your code = 0)
- JSON-LD structured data (
SoftwareApplication) for better search indexing - Extended Open Graph and Twitter Card metadata
- Extension-detected indicator ("Extension installed and ready") badge
- Data attributes (
data-cl-show-when-installed,data-cl-hide-when-installed) for dynamic UI based on install state - OpenRouter added to BYOK pills
- Browser badges (Chrome/Brave/Edge, Firefox, GitHub Releases) dynamically linked from
Fixed
- Copy issue with whitespace visualization characters — Monaco editor (LeetCode) injects U+00B7 (middle dot) and U+200C (zero-width non-joiner) as visible space indicators.
cleanCode()strips these before display and before writing to clipboard, so copied code is clean. - Mermaid showed only raw code — CDN script injection was blocked by extension CSP; replaced with
mermaid.inkimage approach; code-block fallback now also provides an external link. - Double-escaping in markdown tables — fixed in previous sprint; tables now render properly.
- KaTeX CSP violation — fixed in previous sprint; math blocks render as styled code spans.
Changed
- Extension version bumped to 1.1.0 in
manifest.jsonandpackage.json. mermaid-stub.js— completely rewritten; no longer attempts CDN script injection.presence-marker.js— now dispatches both DOM marker and CustomEvent for maximum reliability.landing.js— extended with sessionStorage caching and CustomEvent listener.index.html— substantially expanded with FAQ, stats, browser badges, and SEO improvements.