JSFiddle - React, Tailwind, and code Playground

by r3wt

JavaScript

var title = $('title').html();
var thread = null;
$(window).focusout(function () {
    thread = setInterval(function(){
        $('title').html('New message..').delay(500,function(){
            $('title').html(title);
        });
    },1000);
}).focusin( function(){ 
    thread = null; 
    $('title').html(title);
});