diff options
| author | tim b <timb@camcompu.home> | 2010-04-03 20:36:43 -0700 |
|---|---|---|
| committer | tim b <timb@camcompu.home> | 2010-04-03 20:36:43 -0700 |
| commit | 1239bda75594f1338482f71054dbb6aa84538c86 (patch) | |
| tree | c1497a1503ad46a1728559125e447d0581d4d04c /static/away.js | |
| parent | f3d1b68e3919345c67be06cbd7e7bb61f67ffcbd (diff) | |
committing stuff so i can merge pulled repo
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 |
