This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Google Docs Word Count Floating Badge

Productivity · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryProductivity
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script adds a persistent, draggable floating badge to your Google Docs editor that displays real-time document statistics. The badge shows word count, character count (with and without spaces), and page count—all updating automatically as you type. You no longer need to open the Tools menu or use keyboard shortcuts to check your word count; the information is always visible in a convenient floating window. The badge is fully draggable—you can position it anywhere on the screen, and its position is saved automatically for your next session. A "Copy to clipboard" button lets you quickly copy the word count data for pasting into reports, submissions, or other documents. You can customize which metrics are displayed via checkboxes in the settings panel, showing only what you need.

WHERE IT RUNS

The script runs on all Google Docs domains (*.docs.google.com). It works on document editor pages (/document/) and supports both the main editing view and the print preview mode. It works on 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 floating badge" toggle enables or disables the badge.

- In the "Metrics to Display" section, toggle individual metrics: "Word count," "Character count," "Characters (no spaces)," and "Page count."

- Click "Refresh badge" to force a refresh of the badge display.

- Click "Reset position" to return the badge to its default position in the corner.

The badge appears automatically when you open a Google Docs document. Drag it by clicking and holding anywhere on the badge (except the close button) to reposition it. Click the "✕" button to temporarily hide the badge. Click the "📋 Copy" button to copy all displayed statistics to your clipboard.

TECHNICAL SECTION — REAL MECHANISM

The script detects Google Docs document pages by checking the URL for /document/. It extracts word count data using multiple methods. First, it looks for status bar elements like .docs-title-status-buttons or .docs-status that often display word count information in the Google Docs interface. Second, it looks for meta elements with attributes like data-doc-word-count. Third, as a fallback, it extracts the document body text from the editor element (.docs-editor, .kix-appview-editor, or [role="textbox"]), filters out UI text, and calculates word count by splitting on whitespace, character count by measuring string length, and page count by estimating roughly 250 words per page (a common approximation for academic and business documents). The badge is created as a fixed-position div with a dark glassmorphism style and inserted into the DOM using style properties and textContent (never innerHTML). The badge is draggable using mousedown/mousemove/mouseup event handlers, with position stored via GM_setValue. A MutationObserver watches for changes to the document body and triggers badge updates on a debounced schedule. The badge also updates automatically every 2 seconds via setInterval to ensure real-time accuracy.

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 and badge position are saved 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. Google Docs frequently updates its interface, which may break the selectors used to extract word count data. If the badge stops updating or displaying correctly, please check for script updates. The page count is estimated based on an average of 250 words per page and may not be exact for all document formats. The script stores only your preferences and badge position 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.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.