Universal Comment Thread Depth Limiter
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 Comment Thread Depth Limiter scans comment threads on any webpage and limits the displayed depth to a configurable number of nested levels. Instead of seeing infinitely nested replies, you can choose to show only top-level comments and the first 1-2 replies, keeping discussions clean and readable. Deeper nested comments are collapsed with an expandable "Show more replies" button that lets you reveal additional context when needed. Each comment receives a small depth indicator badge showing its nesting level, making it easy to understand the thread structure at a glance. Comments that exceed the depth limit are visually highlighted, and you can expand or collapse them individually.
WHERE IT RUNS
This script operates as a userscript within the BotGentz extension on any webpage containing comment threads, including news sites, blogs, forums, social media platforms, and custom comment sections. It functions on any modern browser that supports the BotGentz extension, including Chrome, Firefox, Edge, Safari, and Opera. The script works with common comment systems including Disqus, WordPress, Facebook, Reddit, and custom-built comment sections, adapting to different DOM structures automatically.
HOW TO USE
After installation, the script automatically scans the page for comments and applies your depth limit settings. A floating control panel appears showing the current depth limit and providing quick controls. Open the main panel to adjust the maximum depth (1-10 levels), toggle depth badges on or off, enable or disable highlighting of exceeded comments, or choose whether comments are collapsed or expanded by default. Use the "Refresh Comments" button to re-scan the page if new comments are loaded dynamically. Click "Expand All" to reveal all collapsed comments at once, or click individual "Show more replies" buttons to expand specific threads.
THE MECHANISM THAT MAKES IT WORK
The script uses a DOM traversal algorithm that identifies comment elements using multiple selectors (including comment, comment-item, reply, and data-attributes) to work across diverse comment systems. Each comment's depth is calculated by walking up the DOM tree and counting how many comment elements are ancestors, using a recursive parent traversal with safeguards against infinite loops. For each comment, the script compares its depth against the user's max depth setting. Comments exceeding the limit are hidden with CSS display: none and a sibling "Show more replies" button is injected. The button uses event delegation to toggle visibility of all subsequent collapsed comments until the next comment at or above the depth limit. Depth badges are injected as styled spans with level numbers, color-coded to indicate whether the comment is within or beyond the limit. The script integrates with dynamic content by periodically re-scanning for new comments.
THE PANEL
The script panel is built using BotGentz's BGPanel framework and provides comprehensive control over the depth limiter'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 a dropdown menu for selecting the maximum depth (1-10 levels), a text input for excluding specific comments or comment containers using CSS selectors, and toggle switches for enabling the limiter, auto-application on page load, showing depth badges, highlighting exceeded depth, and default collapsed state. Action buttons allow you to refresh comments, expand all, 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 works on most comment systems but may not detect all comments on heavily customized or obfuscated sites. You can use the exclude selectors field to prevent the script from affecting specific comment sections that may have unique structures. The script modifies the page DOM by hiding and showing comment elements; disabling the script restores the original view. Depth detection relies on DOM structure and may be affected by pagination or lazy-loading comments. No data is collected, stored, or transmitted by this script; all processing is performed locally in your browser.