Skip to content

Instantly share code, notes, and snippets.

@ho30hero
ho30hero / clarify.dom.test.mjs
Created September 9, 2026 19:34
rtl-bidi-fix — Hermes Desktop plugin: word-majority RTL direction + LTR isolation (fixes #51318). Install: copy folder to ~/.hermes/desktop-plugins/rtl-bidi-fix/ then Cmd+K -> Reload desktop plugins.
/*
* DOM-level test for the clarifyPass() extension — FULL pipeline (clarifyPass
* runs live, then the plugin's real CSS text is injected verbatim), matching
* the real component structure from apps/desktop clarify-tool.tsx.
*
* Run: node test/clarify.dom.test.mjs
*/
import { readFileSync, writeFileSync } from 'node:fs'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'