🌐 Google Translate Module (translate.js)
The translation engine operates in a self-executing closure:
- Reads the
googtranscookie or URL query?lang=<code>. - Suppresses default Google Translate banners and tooltips.
- Automatically triggers hidden
goog-te-comboselect elements on change. - Preserves language selection across page reloads and relative navigation.
🧜♀️ Mermaid Integration (mermaid-init.js)
The Mermaid module dynamically enhances pages after DOM content loads:
- Scans the DOM for
<pre class="language-mermaid">or<div class="language-mermaid">. - Extracts raw Mermaid diagram syntax.
- Initializes Mermaid with custom dark mode variables (
#07111f,#48d8f2). - Replaces code blocks with
<pre class="mermaid">and executesmermaid.run(). - Automatically wraps bare
<table>elements in responsive.table-wrapdivs.