BiDi is a smart Chrome extension designed to solve text alignment issues for Right-to-Left (RTL) languages like Hebrew and Arabic on websites that default to Left-to-Right (LTR) alignment. It provides persistent, per-site configuration and an intelligent "Auto" mode that detects RTL content and adjusts the layout automatically.
- None: Standard browser behavior for the site.
- RTL (Force): Forces the entire page to use
direction: rtl. - Auto (Smart Detection, default for new sites): Dynamically detects RTL characters (Hebrew, Arabic, etc.) and applies RTL alignment only to elements containing RTL text. Uses a
MutationObserverto handle dynamically loaded content in modern web apps (e.g., Claude, ChatGPT). - Persistence: Your settings are saved per-site and synced across all your Chrome instances using
chrome.storage.sync. - Clean UI: Simple, non-intrusive popup for quick state toggling.
Since BiDi is currently in development, you can load it as an "unpacked extension" in Chrome:
- Clone the repository:
git clone https://github.com/ekrako/bidi.git cd bidi - Install dependencies:
bun install
- Build the extension:
bun run build
- Open Chrome and navigate to
chrome://extensions/. - Enable Developer mode (top right toggle).
- Click Load unpacked and select the
dist/directory in the BiDi project folder.
BiDi is built using Bun for fast builds and testing.
To bundle the extension and prepare the dist/ folder:
bun run buildTo run the test suite:
bun testsrc/content.ts: Core logic for applying RTL/LTR direction.src/popup.ts: Logic for the extension's popup UI.src/storage.ts: Persistence layer usingchrome.storage.src/rtl.ts: Utility for RTL text detection.manifest.json: Extension metadata and permissions.
- Stable release CI submits non-prerelease GitHub releases to the Chrome Web Store automatically.
- If upload succeeds but the publish API call fails, the package can remain uploaded but unpublished. In that case, check the Chrome Web Store Dashboard, review the latest draft submission, and resubmit or publish it manually after fixing the reported issue.
Contributions are welcome! Please see CONTRIBUTING.md for details.
This project is licensed under the MIT License.