Bit of cleaning.
This commit is contained in:
parent
0e7d56b002
commit
2049db8600
@ -753,7 +753,7 @@
|
|||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
table = $.x("following::br[@clear][1]/preceding::table[" + num + "]", a);
|
table = $.x("following::br[@clear]/preceding::table[" + num + "]", a);
|
||||||
while ((prev = table.previousSibling) && (prev.nodeName === 'TABLE')) {
|
while ((prev = table.previousSibling) && (prev.nodeName === 'TABLE')) {
|
||||||
$.rm(prev);
|
$.rm(prev);
|
||||||
}
|
}
|
||||||
@ -1605,7 +1605,7 @@
|
|||||||
$('iframe[name=iframe]').src = 'about:blank';
|
$('iframe[name=iframe]').src = 'about:blank';
|
||||||
fileCount = $('#files', qr.el).childElementCount;
|
fileCount = $('#files', qr.el).childElementCount;
|
||||||
tc = data.textContent;
|
tc = data.textContent;
|
||||||
if (tc !== "Post successful!" && !/uploaded!$/.test(tc)) {
|
if (!/successful!|uploaded!$/.test(tc)) {
|
||||||
if (tc === void 0) {
|
if (tc === void 0) {
|
||||||
data.textContent = "Connection error with sys.4chan.org.";
|
data.textContent = "Connection error with sys.4chan.org.";
|
||||||
}
|
}
|
||||||
@ -2417,8 +2417,7 @@
|
|||||||
_ref = $$('.quotelink', root);
|
_ref = $$('.quotelink', root);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
quote = _ref[_i];
|
quote = _ref[_i];
|
||||||
if (!(qid = quote.hash.slice(1))) continue;
|
if (qid = quote.hash.slice(1)) quotes[qid] = quote;
|
||||||
quotes[qid] = quote;
|
|
||||||
}
|
}
|
||||||
id = $('input', root).name;
|
id = $('input', root).name;
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
|
|||||||
@ -538,7 +538,7 @@ expandThread =
|
|||||||
when 'b' then 3
|
when 'b' then 3
|
||||||
when 't' then 1
|
when 't' then 1
|
||||||
else 5
|
else 5
|
||||||
table = $.x "following::br[@clear][1]/preceding::table[#{num}]", a
|
table = $.x "following::br[@clear]/preceding::table[#{num}]", a
|
||||||
while (prev = table.previousSibling) and (prev.nodeName is 'TABLE')
|
while (prev = table.previousSibling) and (prev.nodeName is 'TABLE')
|
||||||
$.rm prev
|
$.rm prev
|
||||||
for backlink in $$ '.op a.backlink'
|
for backlink in $$ '.op a.backlink'
|
||||||
@ -1247,7 +1247,7 @@ qr =
|
|||||||
fileCount = $('#files', qr.el).childElementCount
|
fileCount = $('#files', qr.el).childElementCount
|
||||||
|
|
||||||
tc = data.textContent
|
tc = data.textContent
|
||||||
if tc isnt "Post successful!" and not /uploaded!$/.test tc # error message
|
unless /successful!|uploaded!$/.test tc # error message, not a successful post
|
||||||
if tc is undefined
|
if tc is undefined
|
||||||
data.textContent = "Connection error with sys.4chan.org."
|
data.textContent = "Connection error with sys.4chan.org."
|
||||||
$.extend $('#error', qr.el), data
|
$.extend $('#error', qr.el), data
|
||||||
@ -1915,9 +1915,9 @@ quoteBacklink =
|
|||||||
quotes = {}
|
quotes = {}
|
||||||
for quote in $$ '.quotelink', root
|
for quote in $$ '.quotelink', root
|
||||||
#don't process >>>/b/
|
#don't process >>>/b/
|
||||||
continue unless qid = quote.hash[1..]
|
if qid = quote.hash[1..]
|
||||||
#duplicate quotes get overwritten
|
#duplicate quotes get overwritten
|
||||||
quotes[qid] = quote
|
quotes[qid] = quote
|
||||||
# op or reply
|
# op or reply
|
||||||
id = $('input', root).name
|
id = $('input', root).name
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
@ -1997,7 +1997,7 @@ quoteInline =
|
|||||||
|
|
||||||
body = $.el 'body',
|
body = $.el 'body',
|
||||||
innerHTML: req.responseText
|
innerHTML: req.responseText
|
||||||
if id == threadID #OP
|
if id is threadID #OP
|
||||||
op = threading.op $('body > form', body).firstChild
|
op = threading.op $('body > form', body).firstChild
|
||||||
html = op.innerHTML
|
html = op.innerHTML
|
||||||
else
|
else
|
||||||
@ -2062,7 +2062,7 @@ quotePreview =
|
|||||||
|
|
||||||
body = $.el 'body',
|
body = $.el 'body',
|
||||||
innerHTML: req.responseText
|
innerHTML: req.responseText
|
||||||
if id == threadID #OP
|
if id is threadID #OP
|
||||||
op = threading.op $('body > form', body).firstChild
|
op = threading.op $('body > form', body).firstChild
|
||||||
html = op.innerHTML
|
html = op.innerHTML
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user