Universal Right-to-Left Text Toggle
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Universal Right-to-Left Text Toggle adds a floating toggle button to any webpage that lets you switch the text direction between Left-to-Right (LTR) and Right-to-Left (RTL) for better readability. When activated, the script applies the dir="rtl" attribute to the HTML or body element and adjusts CSS properties like text-align, float, margin, and padding to properly mirror the layout. The button shows a small color-coded indicator—blue for LTR, amber for RTL—so you always know which mode is active. The script also detects if the page is already in RTL mode based on the language attribute or existing direction settings, and can auto-switch to RTL for languages like Arabic, Hebrew, Persian, and Urdu. Your preferred direction is saved per site, so you don't have to toggle it every time you visit.
WHERE IT RUNS
This script operates as a userscript within the BotGentz extension on any webpage, including news sites, blogs, web applications, documentation, and social media platforms. It functions on any modern browser that supports the BotGentz extension, including Chrome, Firefox, Edge, Safari, and Opera. The script runs entirely client-side, modifying page styles and attributes locally without sending any data to external servers.
HOW TO USE
After installation, a floating toggle button appears in the bottom-right corner of your screen. Click the button to switch between LTR and RTL modes—the page layout and text direction will update immediately. The button includes a small indicator dot (blue for LTR, amber for RTL) showing the current mode. Hover over the button to see a tooltip with the current mode and instructions. Open the panel to customize the default direction, toggle per-site saving, enable or disable auto-detection of RTL languages, show or hide the direction indicator, or adjust the button's position (top-left, top-right, bottom-left, bottom-right). The "Set LTR" and "Set RTL" buttons let you switch modes directly from the panel.
THE MECHANISM THAT MAKES IT WORK
The script uses a hybrid approach to apply RTL formatting. First, it sets the dir="rtl" attribute on the HTML element, which provides the foundational direction change. Second, it applies inline CSS to the body element and to common text-containing elements (p, div, headings, spans, list items, table cells) to ensure text alignment and direction are correctly mirrored. Third, it scans for elements with explicit float properties and toggles them to maintain layout consistency. The auto-detection feature checks the page's lang attribute against a list of RTL languages (Arabic, Hebrew, Persian, Urdu, etc.) and automatically switches to RTL mode when detected. The per-site persistence uses GM_setValue to store the user's preference for each domain, with a fallback to the global default direction. The toggle button's draggable functionality allows users to reposition it anywhere on the screen, with the new position saved in settings.
THE PANEL
The script panel is built using BotGentz's BGPanel framework and provides comprehensive control over the RTL toggle's behavior. The panel opens as a floating overlay that can be dragged anywhere on your screen, with a clean dark theme matching the tool's aesthetic. It includes dropdown menus for default direction (LTR or RTL) and button position (top-left, top-right, bottom-left, bottom-right), and toggle switches for enabling the toggle button, saving preferences per site, auto-detecting RTL languages, and showing the direction indicator. Action buttons allow you to toggle direction, set LTR, set RTL, save settings, or reset all settings to defaults. The panel collapses to a small icon when not in use and expands when clicked, remaining accessible but unobtrusive. Press the Escape key at any time to close the panel.
PLEASE NOTE
This script requires the free BotGentz extension to be installed and activated in your browser. The extension is available from the official BotGentz website. The script attempts to mirror the layout by adjusting common CSS properties, but some complex layouts may not render perfectly in RTL mode. The script applies styles inline and may conflict with existing styles on the page. Auto-detection of RTL languages uses the lang attribute and may not work on all pages. Per-site preferences are stored locally using GM_setValue and are not shared across browsers or devices. No data is collected, stored, or transmitted by this script; all processing is performed locally in your browser.