Skip to content

About

Automatic right-to-left (RTL) rendering for Persian & Arabic messages in Freebuff Desktop. Windows, no installer, fully reversible.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Freebuff RTL Patch 🈸

Automatic right-to-left rendering for Persian & Arabic messages in Freebuff Desktop

Platform License: MIT No installer

Stop fighting with mixed-direction chats. If you write Persian (فارسی) or Arabic (العربية) in Freebuff Desktop, this tiny patch makes those messages render right-to-left and right-aligned — automatically, live, and without touching anything else.


✨ What it does

Before After
Persian text left-aligned, punctuation on the wrong side Proper RTL direction, right-aligned
Code blocks flip around with the text Code blocks (pre / code) stay LTR
Rest of the UI shifts awkwardly Rest of the UI is untouched
  • 🔍 Smart detection — only blocks that actually contain Persian/Arabic characters are switched to RTL. English text and English-only messages stay exactly as they were.
  • ⚡ Live — new messages are detected the moment they appear (MutationObserver), with a lightweight periodic rescan as a safety net.
  • 🛡️ Respectful — elements with an explicit dir attribute set by the app are never overridden, and form fields (input/textarea) work too.
  • 🧩 Self-contained — one small inline style + script, ~4 KB, zero dependencies, nothing sent anywhere.

🚀 Install (Windows)

  1. Quit Freebuff completely — right-click its tray icon → Quit (just closing the window is not enough).
  2. Download this repository (Code → Download ZIP) and unzip it somewhere permanent, e.g. C:\Users\YOU\freebuff-rtl-patch.
  3. Double-click install-rtl-patch.bat.
  4. Start Freebuff — Persian/Arabic messages are now right-aligned. 🎉

The installer:

  • backs up the original file as index.html.bak-before-rtl
  • injects the snippet from rtl-patch.html into %LOCALAPPDATA%\Programs\@codebufffreebuff-desktop\resources\orchestrator\ui\index.html
  • verifies the result and only replaces the file after a successful write (your original file is never left in a broken state)

🔄 After a Freebuff update

App updates overwrite the patched file and RTL stops working. Just double-click apply-rtl-patch.bat again and restart Freebuff. It is safe to run any time — if the patch is already present, nothing happens.

🗑️ Uninstall

Double-click uninstall-rtl-patch.bat — it restores the original file from the backup (or removes the injected snippet if no backup exists), then restart Freebuff.

❓ FAQ

Is this official? No. It is a community patch that edits one file inside the Freebuff install folder. Nothing is sent anywhere, no settings change, and uninstalling restores the original file byte-for-byte.

Does it break app updates? No. Updates simply overwrite the patched file; run apply-rtl-patch.bat after an update to re-apply.

Will it mangle code blocks or English text? No. Content inside pre/code is always left alone, and only elements that actually contain Persian/Arabic characters are switched to RTL.

Freebuff is installed somewhere else Edit the $AppRoot path at the top of inject-rtl.ps1 / remove-rtl.ps1, or run them directly:

powershell -NoProfile -ExecutionPolicy Bypass -File inject-rtl.ps1 -Target "D:\Apps\Freebuff\resources\orchestrator\ui\index.html"

📋 Requirements

  • Windows 10 or 11
  • Freebuff Desktop installed at the default location
  • PowerShell 5.1 (built into Windows — nothing to install)

🧰 Files

File Purpose
rtl-patch.html The snippet (style + script) that gets injected
inject-rtl.ps1 Installer logic (backup → inject → verify → atomic replace)
remove-rtl.ps1 Uninstaller logic (restore backup / strip snippet)
install-rtl-patch.bat Double-click installer
apply-rtl-patch.bat Double-click re-apply (after app updates)
uninstall-rtl-patch.bat Double-click uninstaller

💡 مشکل با فارسی دارید؟ راهنمای فارسی در README.fa.md موجود است.

⚠️ Disclaimer

This is an unofficial, third-party modification provided as-is, with no affiliation to Freebuff or Codebuff. Use at your own discretion. The patch only affects the local UI rendering layer and can be fully reverted with the uninstaller.

📄 License

MIT — free to use, modify and share.

About

Automatic right-to-left (RTL) rendering for Persian & Arabic messages in Freebuff Desktop. Windows, no installer, fully reversible.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages