UserJS.org

Thai wrap

  • Published: 2005-09-14 19:05
  • Modified: 2005-09-19 09:19
  • Author: Art
  • Requires: Opera 8.0
  • Install as: Opera User JS

Learn how to install scripts

Report a bug

Sentences in the Thai language are often constructed of a single long line of characters without any spaces. A word or word group may span several characters, meaning that unless the browser understands the grammar of Thai, it will not know where to break long lines. As a result, Thai pages are often displayed with a horizontal scrollbar, where you must scroll left and right for every sentence.

This script has a basic understanding of Thai grammar, and inserts invisible characters at appropriate parts of the sentences, allowing the browser to break the line there if needed. It works for the majority of Thai pages. (If you experience problems with certain pages, the script lets you specify pages that should use the less agressive version of the script.)

See Art’s page for more details of how the script works.