updater feedback/ui
This commit is contained in:
parent
7ad7249805
commit
d1dd1b8584
@ -833,7 +833,7 @@ updateCallback = ->
|
|||||||
|
|
||||||
l = arr.length
|
l = arr.length
|
||||||
count.textContent = "+#{l}"
|
count.textContent = "+#{l}"
|
||||||
count.className = if l is 0 then '' else 'new'
|
if l > 0 then count.className = 'new'
|
||||||
|
|
||||||
#insert replies in order, so backlinks resolve
|
#insert replies in order, so backlinks resolve
|
||||||
while reply = arr.pop()
|
while reply = arr.pop()
|
||||||
@ -897,6 +897,9 @@ updateInterval = ->
|
|||||||
updateNow = ->
|
updateNow = ->
|
||||||
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>"
|
||||||
|
|||||||
11
4chan_x.js
11
4chan_x.js
@ -1097,7 +1097,9 @@
|
|||||||
}
|
}
|
||||||
l = arr.length;
|
l = arr.length;
|
||||||
count.textContent = "+" + l;
|
count.textContent = "+" + l;
|
||||||
count.className = l === 0 ? '' : 'new';
|
if (l > 0) {
|
||||||
|
count.className = 'new';
|
||||||
|
}
|
||||||
while (reply = arr.pop()) {
|
while (reply = arr.pop()) {
|
||||||
table = x('ancestor::table', reply);
|
table = x('ancestor::table', reply);
|
||||||
inBefore(root, table);
|
inBefore(root, table);
|
||||||
@ -1168,9 +1170,12 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
updateNow = function() {
|
updateNow = function() {
|
||||||
var url;
|
var count, url;
|
||||||
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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user