Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1.04 KB

File metadata and controls

46 lines (27 loc) · 1.04 KB

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>

Adding Notifications

Adding notification

Call the following function to add +1 to notifications total.

titlenotifier.add();

Subtracting Notifications

Subtracting notification

Call the following to subtract 1 from the total notifications.

titlenotifier.sub();

Reset Notifications

resetting notification

Call the following to set notifications to zero and the title to the original version.

titlenotifier.reset();

Contribute

Contributions are welcome.