Logo
4 Jun 2014 | 1 min. (142 words)

Create a flashing tab notification page title

Page title notifications switch between the default page title and a notification message continously in order to grab the user’s attention. This is commonly used with chat applications.

I’ve written a small javascript object which can be used to switch on and off page title notifications.

To activate the page title notification call the following:

pageTitleNotification.on("New Message!");

Then call the following to turn it off:

pageTitleNotification.off()

The default speed is 1000 milliseconds, but this can be customised by passing a 2nd parameter to the on() function.

pageTitleNotification.on("New Message!", 5000);

Download

There are various ways you can integrate this into your project:

npm

Run the following npm install command:

npm install flashing-page-title-notification --save

https://www.npmjs.com/package/flashing-page-title-notification

Minified file

Download the minified javascript version from GitHub:

PageTitleNotification.min.js

Demo

https://flashing-page-title-notification.netlify.com/demo

GitHub

Full source code available on GitHub. Please feel free to raise any issues or pull requests!

https://github.com/curtiscde/Flashing-Page-Title-Notification

javascript notification page-title project
Twitter Facebook

Copy table schema to new a table

…

Namespacing jQuery event handlers

How to better manage jQuery event handlers…

Related Links

  • LinkedIn
  • Twitter: @curtcode
  • Stack Overflow
  • GitHub: @curtiscde

Stack Exchange

profile for Curtis on Stack Exchange, a network of free, community-driven Q&A sites
Follow @curtiscde

Recent Posts

  • Displaying latest posts on your GitHub profile
  • Using Codecov within a monorepo
  • Displaying Strava stats using webhooks & GitHub Actions
  • Filtering duplicate data points on Chart.js
  • Next.js Typerite Template Boilerplate
Theme Bleak by zutrinken Published with Hugo
Menu
  • Download
    • npm
    • Minified file
  • Demo
  • GitHub