Line Length Optimizer for Readability
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
Line Length Optimizer for Readability improves your reading experience by controlling how text is displayed on any webpage. Based on typographic research showing that 50-75 characters per line is optimal for reading speed and comprehension, the script applies CSS to limit line length and enhance text presentation. A panel overlay provides real-time controls: a slider adjusts maximum line width from 40 to 100 characters, with live visual feedback as you move it. Additional controls let you fine-tune line height (1.0 to 2.5), paragraph spacing, and text alignment (left, right, center, or justified). The script automatically detects main content areas—articles, posts, and large text blocks—so you don't have to configure anything. Settings are saved per-site, letting you optimize news sites differently from coding documentation or long-form articles.
WHERE IT RUNS
This script runs on any webpage with text content—news articles, blog posts, documentation pages, forums, and social media. It operates entirely within your browser tab, injecting CSS to adjust how text is rendered. The script cannot access other tabs, your browsing history, bookmarks, downloads, or any data outside the current page. All settings—including line length, line height, paragraph spacing, alignment, and per-site preferences—are stored locally using GM_setValue and never transmitted anywhere.
HOW TO USE
After installing with the BotGentz extension, the script automatically optimizes text on every page you visit (if auto-detect is enabled). The panel shows your current settings and provides sliders to adjust line length, line height, and paragraph spacing in real-time—the page updates instantly as you slide. Use the alignment dropdown to switch between left, justified, center, or right alignment. Toggle "Apply to All Text" to apply optimizations to the entire page rather than just the main content area. Enable "Per-site Override" to save different settings for each domain—for example, wider lines for coding documentation and narrower lines for news articles. Click "Refresh Detection" to re-scan for content areas if the page changes dynamically, and "Copy CSS" to export the current settings as CSS for use in your own stylesheets.
THE REAL MECHANISM
The script uses a heuristic content detection system to find the main text areas on a page. It first looks for semantic HTML tags (main, article) and common content classes (.content, .post, .entry, .article). If none are found, it scans all div and section elements, measuring text content length and sentence count to identify the largest coherent text block. Once content containers are identified, the script generates a CSS rule with selectors targeting those elements. The max-width is set in ch units (character width), ensuring the line length adapts to the font size being used. The !important flag overrides any existing page styles. Line height, paragraph spacing, and alignment are applied to all paragraph and heading elements within the content containers. If "Apply to All Text" is enabled, the script adds additional rules targeting body and all child elements. The per-site override system stores a complete settings object per domain, allowing independent configurations. All CSS injection uses a single style element that is replaced on each update, avoiding accumulation of redundant styles.
THE PANEL
The Line Length Optimizer panel is a BGPanel component that you can drag anywhere on your screen by its header. It snaps to the nearest edge when released, keeping your workspace organized. The panel collapses to a small bubble showing only the emoji icon when minimised—click to expand it again. You can resize the panel horizontally to see more of the controls. Press the Escape key to collapse the panel instantly. Your panel position and size are saved per-site.
PLEASE NOTE
This script requires the free BotGentz browser extension to function. The content detection heuristics work on most websites but may occasionally miss content areas on pages with unusual structures. Use the "Refresh Detection" button to re-scan after page updates. The ch unit is relative to the font's character width; if the font is variable or uses different character widths, the displayed line length may vary slightly from the setting. Some websites may have styles that conflict with the !important overrides—the script attempts to maintain compatibility but cannot guarantee results on all pages. The script never reads or writes password fields, hidden inputs, or file inputs. It stores only your line length, line height, paragraph spacing, alignment, apply-to-all-text preference, and per-site override preferences locally. No page content, reading data, or personal information is ever collected, transmitted, or shared.