diff options
author | friendica <info@friendica.com> | 2013-07-21 18:34:15 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-07-21 18:34:15 -0700 |
commit | 400f3baee993b7d1a4cbcdc09b99d8224d8f2ac0 (patch) | |
tree | 4a094d90472379c8d8fbfaecd4e3bf150677d7e5 /view/theme/redbasic | |
parent | 19f674c29d181565f8a5ef30ce6ae288976f6964 (diff) | |
download | volse-hubzilla-400f3baee993b7d1a4cbcdc09b99d8224d8f2ac0.tar.gz volse-hubzilla-400f3baee993b7d1a4cbcdc09b99d8224d8f2ac0.tar.bz2 volse-hubzilla-400f3baee993b7d1a4cbcdc09b99d8224d8f2ac0.zip |
fix error updating pagetitle with notify count if not logged in locally (no notify count available)
Diffstat (limited to 'view/theme/redbasic')
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index c1f67dcd5..eecd46d96 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -86,13 +86,16 @@ $('.savedsearchterm').hover( }); - $(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); - })
\ No newline at end of file +$(document).ready(function(){ + var doctitle = document.title; + function checkNotify() { + var notifyUpdateElem = document.getElementById('notify-update'); + if(typeof(notifyUpdateElem) != 'undefined') { + if(notifyUpdateElem.innerHTML != "") + document.title = "("+notifyUpdateElem.innerHTML+") " + doctitle; + else + document.title = doctitle; + } + }; + setInterval(function () {checkNotify();}, 10 * 1000); +});
\ No newline at end of file |