diff options
Diffstat (limited to 'js/auto-reload.js')
| -rw-r--r-- | js/auto-reload.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/js/auto-reload.js b/js/auto-reload.js index 725b4b51..9f5fe052 100644 --- a/js/auto-reload.js +++ b/js/auto-reload.js @@ -9,10 +9,13 @@ * * Usage: * $config['additional_javascript'][] = 'js/jquery.min.js'; + * //$config['additional_javascript'][] = 'js/titlebar-notifications.js'; * $config['additional_javascript'][] = 'js/auto-reload.js'; * */ +auto_reload_enabled = true; // for watch.js to interop + $(document).ready(function(){ if($('div.banner').length == 0) return; // not index @@ -24,12 +27,17 @@ $(document).ready(function(){ var end_of_page = false; - var orig_title = document.title; var new_posts = 0; var first_new_post = null; - var update_title = function() { - document.title = (new_posts ? "("+new_posts+") " : "") + orig_title; - }; + + if (typeof update_title == "undefined") { + var update_title = function() { }; + } + + if (typeof add_title_collector != "undefined") + add_title_collector(function(){ + return new_posts; + }); var window_active = true; $(window).focus(function() { @@ -66,6 +74,7 @@ $(document).ready(function(){ recheck_activated(); } }); + time_loaded = Date.now(); // interop with watch.js } }); |
