What problem does it solve?
Verifying a browser extension's translation behavior end-to-end is error-prone: Chrome 137+ ignores --load-extension, MV3 service worker CSP blocks eval-based config patching, background init clobbers early config writes, and macOS dead keys break hotkey simulation. This Skill encodes the working recipe for driving the built read-frog extension in real Chrome with Puppeteer so DOM assertions actually reflect extension behavior.
Core Features & Use Cases
- Extension loading on Chrome 137+: Uses puppeteer.launch with pipe and enableExtensions plus browser.installExtension instead of deprecated --load-extension flags.
- Config patching through the service worker: Read-merge-writes the whole config object in chrome.storage.local with inlined mutations, re-patches after init, and forces targetCode to 'cmn' to avoid the same-language skip.
- Message-based toggling and DOM assertions: Sends the webext-core askManagerToTogglePageTranslation envelope from the service worker and asserts on CJK text, translation wrappers, and data-read-frog-translation-only anchors.
- Use Case: Reproduce a DOM bug like issue #2011 on a React fixture page, toggle translation on and off programmatically, and assert that restore leaves no wrappers while walk labels persist by design.
Quick Start
Copy references/harness-template.js into a scratchpad, point EXT_PATH at the built .output/chrome-mv3 directory, serve a fixture over localhost, and run the script with node to watch the extension translate and restore the page in headed Chrome.