Browser extension
Bale Unread Monitor
Checking a messaging tab repeatedly interrupts whatever you opened the browser to do. I built an extension that watches the open Bale web client and delivers an alert to the user’s Telegram chat.
- My role
- Extension developer
- Project context
- Chrome Web Store extension
- Tools
- JavaScript · Chrome Extension API · MutationObserver · Telegram API
A page change is the signal
The Bale web client already displays unread badges, sender names and message previews. The challenge was to recognize a relevant change among ordinary page updates and notify the user once. The extension runs in Chrome while the Bale page is open.
Engineering decisions
Observe the unread indicator
I used MutationObserver to react when Bale updates the page. This lets the browser signal a change and gives the extension a specific moment to check the visible unread state.
Let a burst of updates settle
A conversation row can change several times for the same activity. The extension debounces updates, filters typing indicators and checks for duplicates before preparing an alert.
Deliver directly from Chrome
The user supplies a Telegram bot token and chat ID, which are stored in Chrome’s local extension storage. The extension sends the notification, including the applicable message preview, directly to Telegram over HTTPS.
- Bale updates the unread badge
- Chrome filters repeated changes
- Telegram receives the alert
An alert where the user is listening
With the Bale tab open and the extension configured, users can receive updates in their own Telegram chat. They can clear their saved settings in the extension. The published privacy policy explains which information is accessed and where it goes.
