diff options
| author | sostler <sbostler@gmail.com> | 2010-04-06 21:53:42 -0400 |
|---|---|---|
| committer | sostler <sbostler@gmail.com> | 2010-04-06 21:53:42 -0400 |
| commit | a0334eba97fb985ee290c11f6ee72196dbe889b0 (patch) | |
| tree | d348e857b04d4e47bfb7afb712c7bee70545a6cc /static/away.js | |
| parent | a514554be0b15d937959af2d52c03da7eee3d60f (diff) | |
| parent | ab5e22770ce39adc94f444de18763a4b4674113a (diff) | |
Merge RM of static/help.html
Diffstat (limited to 'static/away.js')
| -rwxr-xr-x | static/away.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/static/away.js b/static/away.js deleted file mode 100755 index cf4b19c..0000000 --- a/static/away.js +++ /dev/null @@ -1,28 +0,0 @@ -var UnseenMsgCounter = 0; -var OrigTitle = $('title').text(); -var HasFocus = true; - -function onFocus() { - HasFocus = true; - UnseenMsgCounter = 0; - $('title').text(OrigTitle); -} - -function onBlur() { - HasFocus = false; -} - -$(window).blur(onBlur); -$(window).focus(onFocus); - -function titleUpdater() { - if (HasFocus || UnseenMsgCounter == 0 || $('title').text() != OrigTitle) { - $('title').text(OrigTitle); - } else { - var plural = UnseenMsgCounter > 1 ? 's' : ''; - $('title').text(UnseenMsgCounter + ' new dump' + plural + '! | ' + OrigTitle); - } - setTimeout(titleUpdater, 2000); -} - -setTimeout(titleUpdater, 2000);
\ No newline at end of file |
