Auto RTL for AI Chatbots (Arabic & Persian)

Automatically detects Arabic/Persian text in ChatGPT, Gemini, and Grok and applies Right-to-Left (RTL) formatting.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Autor
AmirRezaTamandani
Dziennych instalacji
2
Wszystkich instalacji
8
Oceny
0 0 0
Wersja
1.1
Utworzono
08-07-2026
Zaktualizowano
12-07-2026
Rozmiar
2,34 KB
Licencja
MIT
Dotyczy

Auto RTL for AI Chatbots: The Fix for Persian & Arabic Reading right-to-left languages like Persian (Farsi) and Arabic in default left-to-right (LTR) AI chat interfaces is a broken experience. Punctuation lands on the wrong side, sentence structure visually collapses, and reading long responses becomes a chore.

This script automatically detects RTL characters in AI responses and instantly corrects the text direction and alignment, restoring natural readability.

Features Zero-Click Activation: Runs automatically in the background. If the AI replies in Persian or Arabic, the text instantly aligns to the right and switches to dir="rtl".

Smart Detection: Uses Unicode ranges to target paragraphs containing Arabic/Persian scripts without affecting English text.

Code-Block Safe: Explicitly ignores

 and  blocks so your programming outputs remain strictly LTR and correctly formatted.

High-Performance: Uses a lightweight MutationObserver to flip text chunks instantly as they stream onto the page, avoiding layout thrashing or browser lag.

Supported Platforms ChatGPT (chatgpt.com)

Google Gemini (gemini.google.com)

Grok (x.com/i/grok)

Pro-Tip: Vazirmatn Font Integration Proper localization isn't just about direction; it's about typography. The script includes a commented-out line to apply the Vazirmatn font. If you value clean Persian web typography, simply open the script in Tampermonkey and uncomment this line:

JavaScript // el.style.fontFamily = 'Vazirmatn, Tahoma, Arial, sans-serif'; About the Author Built by Amir Reza Tamandani (TMAN) to enforce proper RTL layout rules and better localization for the frontend web community.