From 9cabcad36c505cd8a0eb93f720c87721c3a603b3 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 17 Sep 2012 14:53:17 +0100 Subject: [PATCH] Add title bar notifications to Smoothly --- view/theme/smoothly/bottom.tpl | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/view/theme/smoothly/bottom.tpl b/view/theme/smoothly/bottom.tpl index 800dc6370..06faa9c56 100644 --- a/view/theme/smoothly/bottom.tpl +++ b/view/theme/smoothly/bottom.tpl @@ -47,13 +47,15 @@ function cmtBbClose(id) { $(".comment-edit-bb-" + id).hide(); } -var doctitle = document.title; -function checkNotify() { - if(document.getElementById("notify-update").innerHTML != "") { - document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle; - } else { - document.title = doctitle; - }; - setInterval(function () {checkNotify();}, 10 * 1000); -} + + $(document).ready(function(){ + var doctitle = document.title; + function checkNotify() { + if(document.getElementById("notify-update").innerHTML != "") + document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle; + else + document.title = doctitle; + }; + setInterval(function () {checkNotify();}, 10 * 1000); + })