Slack Thread Reply Counter Badge
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
This script adds visible reply count badges to Slack messages that have threads. When you're browsing a Slack channel or DM, the script detects messages with replies and displays a badge next to the message showing how many replies the thread has. The badge appears as a colored pill with the reply count (e.g., "3 replies" or a numbered badge). As new replies are added, the badge updates automatically. A sorted list of threads by reply count is displayed in the settings panel, helping you find the most active discussions. The script works in both the main message view and the thread view, and supports both desktop and mobile.
WHERE IT RUNS
The script runs on all Slack pages (*.slack.com). It works in channels, DMs, and thread views. It supports both desktop and mobile views.
HOW TO USE
After installation, the settings panel appears on the left side of the screen with the gear emoji (⚙️). Open the panel to configure the script:
- The "Show reply counter badges" toggle enables or disables the badges.
- Toggle "Show reply count in badge" to show or hide the count (when disabled, a 💬 icon is shown instead).
- The "Threads Sorted by Replies" section shows messages with the most replies first.
- Click "Refresh badges" to manually re-scan the chat for thread badges.
The script works automatically—just open any Slack channel and thread badges will appear.
TECHNICAL SECTION — REAL MECHANISM
The script detects Slack pages by checking the URL for slack.com. It finds messages with threads by looking for elements with class names like .c-message_kit__thread_reply_count, .c-message_kit__thread, .c-message__thread_button, and .reply-count. It extracts the reply count by parsing the text content of the reply count element or by searching for patterns like "X replies." The badge is created as a span element with a colored background and inserted next to the message's actions or timestamp. The badge uses display:inline-flex and is styled with Slack's accent color (#4a96c7). A WeakSet tracks processed messages to avoid duplicate badges. The sorted list in the panel is built by extracting the reply count from each threaded message, sorting by count in descending order, and displaying the top 20 threads. A MutationObserver watches for DOM changes and re-processes messages when new replies are added or when the user navigates to a new channel.
THE PANEL
The settings panel is built with BotGentz's BGPanel component. It is draggable via its header, allowing you to reposition it anywhere on the screen. The panel snaps to the left edge by default but can be moved freely. Click the gear emoji to collapse the panel into a small bubble, and click the bubble to expand it again. The panel remembers its position per page session. Press the Escape key to quickly close or minimize the panel. The panel includes a status flash bar that provides visual feedback when settings are changed or actions are performed. All settings save automatically via GM_setValue.
PLEASE NOTE
This script requires the free BotGentz browser extension to run. It does not function as a standalone Chrome extension and does not use chrome.* APIs. Slack frequently updates its interface and class names, which may affect the selectors used to find messages and reply counts. If the badges stop appearing, please check for script updates. The script relies on Slack's reply count indicators—if Slack changes how reply counts are displayed, the script may need to be updated. The sorted thread list shows messages from the current view only; it does not search the entire workspace. The script stores only your preferences via GM_setValue. No data is sent externally—all data is stored locally in your browser. The script never reads or writes password fields, hidden inputs, or file inputs. All DOM operations use safe methods (style properties, textContent, appendChild) and never use innerHTML.