diff options
| author | sostler <sbostler@gmail.com> | 2010-05-20 20:36:33 -0400 |
|---|---|---|
| committer | sostler <sbostler@gmail.com> | 2010-05-20 20:36:33 -0400 |
| commit | 7cd97594cf46bb942d07099ffb05fcbceb609e9b (patch) | |
| tree | df701aa1a6a530175e0f3d80c60e6f473d2ea3ba /static/js/pichat.js | |
| parent | 04bec93bf1d58e7a75268651b54fdce566c408b1 (diff) | |
Use function to startTitleUpdater
Diffstat (limited to 'static/js/pichat.js')
| -rw-r--r-- | static/js/pichat.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index b212fbd..9b58b5c 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -989,9 +989,6 @@ function onBlur() { HasFocus = false; } -$(window).blur(onBlur); -$(window).focus(onFocus); - function titleUpdater() { if (HasFocus || UnseenMsgCounter == 0 || $('title').text() != OrigTitle) { $('title').text(OrigTitle); @@ -1002,4 +999,8 @@ function titleUpdater() { setTimeout(titleUpdater, 2000); } -setTimeout(titleUpdater, 2000); +function startTitleUpdater() { + $(window).blur(onBlur); + $(window).focus(onFocus); + setTimeout(titleUpdater, 2000); +} |
