TitleNotifier.js
👋 Lightweight (< 3kb), dependency-free javascript library to dynamically show the number of unread notifications in your webpage title through a simple API.
Install / Use
/learn @roshiro/TitleNotifier.jsREADME
Title Notifier js
Lightweight (< 3Kb), dependency-free javascript library to dynamically show the number of unread notifications in your webpage title.

Usage
Add title_notifier.js to your webpage.
<script src="title_notifier.js"></script>
Setting Notification
In the example below, it sets the number of notifications as 12.
titlenotifier.set(12);
Adding Notifications
Call the following function to add +1 to notifications total.
titlenotifier.add();
Subtracting Notifications
Call the following to subtract 1 from the total notifications.
titlenotifier.sub();
Reset Notifications
Call the following to set notifications to zero and the title to the original version.
titlenotifier.reset();
Get Number of Notifications (NEW)
Call the following to get the current number of notifications
titlenotifier.get();
Set Max Number of Notifications (NEW)
Call the following to set maximum number of notifications to display. Once the maximum number is reached it displays the max number plus a plus sign. If you set the max to 99 and you have 100 notifications, it will show 99+ instead of 100.
titlenotifier.max(99);
Contribute
Contributions are welcome.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
