A Chrome extension that automatically sets the translate="no"
attribute on <code>
and <pre>
elements to prevent automatic translation of code snippets.
- Automatically adds
translate="no"
to all<code>
and<pre>
tags on any webpage - Works immediately upon page load
- Monitors DOM changes to apply the attribute to dynamically added elements
- Lightweight with minimal performance impact
Code snippets and pre-formatted text often produce nonsensical results when translated by browser translation services. This extension ensures that code blocks remain in their original form, making technical documentation and programming tutorials more readable when the rest of the page is translated.
- Visit the Chrome Web Store page for this extension
- Click "Add to Chrome"
- Confirm the installation
- Clone this repository or download it as a ZIP file
- Build the extension with
npm run build
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" in the top-right corner
- Click "Load unpacked" and select the extension directory
- The extension is now installed and active
- Node.js and npm
- Clone this repository
- Install dependencies: