Revert "tweak updater notifications"

This reverts commit d20a08080fd660b49f47940a5add990dbd3465f0.
This commit is contained in:
James Campos 2011-01-18 04:00:04 -08:00
parent 7441b1a2dc
commit 31f400715f
2 changed files with 14 additions and 18 deletions

View File

@ -865,17 +865,13 @@ updateFavicon = ->
updateTime = -> updateTime = ->
span = $ '#updater #timer' span = $ '#updater #timer'
time = Number span.textContent time = Number span.textContent
count = $ '#updater #count'
count.textContent = ''
count.className = ''
if ++time is 0 if ++time is 0
updateNow() updateNow()
else if time > 10 else if time > 10
time = 0
g.req.abort() g.req.abort()
updateNow() updateNow()
count.textContent = 'retry' span.textContent = time
else
span.textContent = time
updateTitle = -> updateTitle = ->
len = g.replies.length len = g.replies.length
@ -902,9 +898,11 @@ updateInterval = ->
span.textContent = -1 * num span.textContent = -1 * num
updateNow = -> updateNow = ->
$("#updater #timer").textContent = 0
url = location.href + '?' + new Date().getTime() # fool the cache url = location.href + '?' + new Date().getTime() # fool the cache
g.req = request url, updateCallback g.req = request url, updateCallback
count = $ '#updater #count'
count.textContent = 'Updating...'
count.className = ''
updaterMake = -> updaterMake = ->
html = "<div class=move><span id=count></span> <span id=timer>Thread Updater</span></div>" html = "<div class=move><span id=count></span> <span id=timer>Thread Updater</span></div>"

View File

@ -1186,21 +1186,17 @@
return replace(favicon, clone); return replace(favicon, clone);
}; };
updateTime = function() { updateTime = function() {
var count, span, time; var span, time;
span = $('#updater #timer'); span = $('#updater #timer');
time = Number(span.textContent); time = Number(span.textContent);
count = $('#updater #count');
count.textContent = '';
count.className = '';
if (++time === 0) { if (++time === 0) {
return updateNow(); updateNow();
} else if (time > 10) { } else if (time > 10) {
time = 0;
g.req.abort(); g.req.abort();
updateNow(); updateNow();
return count.textContent = 'retry';
} else {
return span.textContent = time;
} }
return span.textContent = time;
}; };
updateTitle = function() { updateTitle = function() {
var len; var len;
@ -1232,10 +1228,12 @@
} }
}; };
updateNow = function() { updateNow = function() {
var url; var count, url;
$("#updater #timer").textContent = 0;
url = location.href + '?' + new Date().getTime(); url = location.href + '?' + new Date().getTime();
return g.req = request(url, updateCallback); g.req = request(url, updateCallback);
count = $('#updater #count');
count.textContent = 'Updating...';
return count.className = '';
}; };
updaterMake = function() { updaterMake = function() {
var autoG, autoL, div, html, interval; var autoG, autoL, div, html, interval;