Chrome extension to translate Darija
# Darija Translator Chrome Extension
A Chrome extension that translates Darija (Moroccan Arabic) messages in Instagram DMs, Facebook Messenger, and Messenger with a single click.
## Features
- **One-click translation** - Click any message to translate it instantly
- **Multi-platform support** - Works on Instagram, Facebook Messenger, and standalone Messenger
- **Keyboard shortcut** - Select text and press Ctrl+Shift+T to translate in opposite direction
- **Bidirectional translation** - Switch between English↔Darija in settings
- **Toggle functionality** - Click again to restore original text
- **Multi-language support** - Translates between English and Darija (Moroccan Arabic)
- **Real-time detection** - Works with new messages as they load
- **Clean interface** - Seamless integration with platform UIs
## Supported Platforms
- **Instagram Direct Messages** (`
instagram.com`)
- **Facebook Messenger** (`
facebook.com`)
- **Standalone Messenger** (`messenger.com`)
- **Mobile variants** (m.facebook.com, m.messenger.com)
## Installation
1. **Clone or download this repository**
```bash
git clone git@github.com:tavurth/chrome-darija.git
```
2. **Load the extension in Chrome**
- Open Chrome and navigate to `chrome://extensions/`
- Enable "Developer mode" (toggle in top-right corner)
- Click "Load unpacked"
- Select the downloaded `chrome-darija` folder
3. **Configure API access**
- Sign up at OpenRouter
- Generate an API key
- Click the extension icon in Chrome toolbar
- Enter your API key and translation direction
- Click "Save Settings"
## Usage
### Click Translation
1. Navigate to any supported platform's messaging interface
2. Click any message to translate it based on your selected direction
3. Click the translated message to restore the original text
### Keyboard Shortcut
1. Select any text in the messaging interface
2. Press Ctrl+Shift+T to translate in the opposite direction
3. The selected text will be replaced with the translation
## T …