Come Back Window Tab

Look Demo

Tell a visitor to come back to your site when they switch browser tabs. This plugin uses code injection and works with all template families.

How To Install

From your Squarespace account, go to Site Code Injection. Copy and paste the code below into the Header Code Injection box.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

Next, copy and paste the code below into the Footer Code Injection box.

<script>
$(function() {
    // Get page title
    var pageTitle = $("title").text();

    // Change page title on blur
    $(window).blur(function() {
      $("title").text("Hey, Come Back");
    });

    // Change page title back on focus
    $(window).focus(function() 
      
    );
});
</script>

Customize

Change the Hey, Come Back text to whatever you’d like. Have fun with it by adding emojis. 😄 🥑 🎉

Make sure you do not delete the quotation “ “ marks around the text.

Notes

No notes.

Random, New 🎉Moov Labs