Auto-RTL

Content-only RTL: p/li/blockquote + spans in content areas. First alphabetic char decides. Ultra-light (IO/MO/RAF). Per-domain toggle (OFF by default). Ctrl+Alt+R hotkey. Tiny, transparent edge toggle near scrollbar.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
Momo21798
Installazioni giornaliere
1
Installazioni totali
2
Valutazione
0 0 0
Versione
0.4.3
Creato il
21/09/2025
Aggiornato il
21/09/2025
Dimensione
9,98 KB
Licenza
MIT
Applica a
Tutti i siti

Many websites (Substack, blogs, forums, etc.) don’t automatically handle Persian/Arabic right-to-left text correctly.

This script fixes that only for real content paragraphs, without breaking menus or buttons.

It scans p, li, blockquote, and inline span elements inside article/content containers.
It finds the first alphabetic character in each element.
If that character is Arabic or Persian, the script applies direction: rtl; and aligns the text properly.
If not, the element stays untouched.
Invisible characters, spaces, punctuation, etc. are skipped until the first real letter is found.
This way, mixed-language text looks natural and only paragraphs that truly start in Persian/Arabic switch to RTL.

By default, the script is off for every site.
To enable it for the current domain:
* Press Ctrl+Alt+R, or
* Click the tiny pill-shaped toggle that sits on the right edge of the screen, vertically centered near the scrollbar.

The toggle’s state is remembered per domain. Next time you visit, it’ll be the same as you left it.
Toggle again (or press the hotkey again) to turn it off.

This script was written quickly and then reviewed/refactored with the help of AI.
It's not perfect. if you notice issues, please leave a comment and I’ll try to fix them.

P.S. It works only on visible (or nearly visible) elements, to keep it very light on resources. It also handles infinite scroll and live content changes.