more 404 stuff
This commit is contained in:
parent
4f91cd28ba
commit
bf88a1eaaa
@ -813,9 +813,19 @@ request = (url, callback) ->
|
|||||||
|
|
||||||
updateCallback = ->
|
updateCallback = ->
|
||||||
count = $ '#updater #count'
|
count = $ '#updater #count'
|
||||||
|
timer = $ '#updater #timer'
|
||||||
if @status is 404
|
if @status is 404
|
||||||
count.textContent = 404
|
count.textContent = 404
|
||||||
count.className = 'error'
|
count.className = 'error'
|
||||||
|
timer.textContent = ''
|
||||||
|
clearInterval g.interval
|
||||||
|
for input in $$ 'input[type=submit]'
|
||||||
|
input.disabled = true
|
||||||
|
input.value = 404
|
||||||
|
s = ''
|
||||||
|
if getConfig 'Unread Count' then s += "(#{g.replies.length}) "
|
||||||
|
s += "/#{g.BOARD}/ - 404"
|
||||||
|
document.title = s
|
||||||
g.dead = true
|
g.dead = true
|
||||||
updateFavicon()
|
updateFavicon()
|
||||||
return
|
return
|
||||||
@ -837,8 +847,7 @@ updateCallback = ->
|
|||||||
count.textContent = "+#{i}"
|
count.textContent = "+#{i}"
|
||||||
count.className = if i is 0 then '' else 'new'
|
count.className = if i is 0 then '' else 'new'
|
||||||
|
|
||||||
span = $ '#updater #timer'
|
timer.textContent = -1 * GM_getValue 'Interval', 10
|
||||||
span.textContent = -1 * GM_getValue 'Interval', 10
|
|
||||||
|
|
||||||
updateFavicon = ->
|
updateFavicon = ->
|
||||||
len = g.replies.length
|
len = g.replies.length
|
||||||
@ -877,10 +886,10 @@ updateAuto = ->
|
|||||||
span = $ '#updater #timer'
|
span = $ '#updater #timer'
|
||||||
if @checked
|
if @checked
|
||||||
span.textContent = -1 * GM_getValue 'Interval', 10
|
span.textContent = -1 * GM_getValue 'Interval', 10
|
||||||
g.timer = window.setInterval updateTime, 1000
|
g.interval = window.setInterval updateTime, 1000
|
||||||
else
|
else
|
||||||
span.textContent = ''
|
span.textContent = ''
|
||||||
clearInterval g.timer
|
clearInterval g.interval
|
||||||
|
|
||||||
updateInterval = ->
|
updateInterval = ->
|
||||||
unless n = Number @value
|
unless n = Number @value
|
||||||
|
|||||||
24
4chan_x.js
24
4chan_x.js
@ -1070,11 +1070,26 @@
|
|||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
updateCallback = function() {
|
updateCallback = function() {
|
||||||
var body, count, i, id, replies, reply, root, span, table;
|
var body, count, i, id, input, replies, reply, root, s, table, timer, _i, _len, _ref;
|
||||||
count = $('#updater #count');
|
count = $('#updater #count');
|
||||||
|
timer = $('#updater #timer');
|
||||||
if (this.status === 404) {
|
if (this.status === 404) {
|
||||||
count.textContent = 404;
|
count.textContent = 404;
|
||||||
count.className = 'error';
|
count.className = 'error';
|
||||||
|
timer.textContent = '';
|
||||||
|
clearInterval(g.interval);
|
||||||
|
_ref = $$('input[type=submit]');
|
||||||
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
|
input = _ref[_i];
|
||||||
|
input.disabled = true;
|
||||||
|
input.value = 404;
|
||||||
|
}
|
||||||
|
s = '';
|
||||||
|
if (getConfig('Unread Count')) {
|
||||||
|
s += "(" + g.replies.length + ") ";
|
||||||
|
}
|
||||||
|
s += "/" + g.BOARD + "/ - 404";
|
||||||
|
document.title = s;
|
||||||
g.dead = true;
|
g.dead = true;
|
||||||
updateFavicon();
|
updateFavicon();
|
||||||
return;
|
return;
|
||||||
@ -1097,8 +1112,7 @@
|
|||||||
}
|
}
|
||||||
count.textContent = "+" + i;
|
count.textContent = "+" + i;
|
||||||
count.className = i === 0 ? '' : 'new';
|
count.className = i === 0 ? '' : 'new';
|
||||||
span = $('#updater #timer');
|
return timer.textContent = -1 * GM_getValue('Interval', 10);
|
||||||
return span.textContent = -1 * GM_getValue('Interval', 10);
|
|
||||||
};
|
};
|
||||||
updateFavicon = function() {
|
updateFavicon = function() {
|
||||||
var clone, favicon, href, len;
|
var clone, favicon, href, len;
|
||||||
@ -1145,10 +1159,10 @@
|
|||||||
span = $('#updater #timer');
|
span = $('#updater #timer');
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
span.textContent = -1 * GM_getValue('Interval', 10);
|
span.textContent = -1 * GM_getValue('Interval', 10);
|
||||||
return g.timer = window.setInterval(updateTime, 1000);
|
return g.interval = window.setInterval(updateTime, 1000);
|
||||||
} else {
|
} else {
|
||||||
span.textContent = '';
|
span.textContent = '';
|
||||||
return clearInterval(g.timer);
|
return clearInterval(g.interval);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
updateInterval = function() {
|
updateInterval = function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user