use switch
This commit is contained in:
parent
e975e9d2d8
commit
c1cd50c2dc
@ -576,7 +576,16 @@
|
||||
return $.cache[pathname].abort();
|
||||
case '-':
|
||||
a.textContent = a.textContent.replace('-', '+');
|
||||
num = g.BOARD === 'b' ? 3 : g.BOARD === 't' ? 1 : 5;
|
||||
num = (function() {
|
||||
switch (g.BOARD) {
|
||||
case 'b':
|
||||
return 3;
|
||||
case 't':
|
||||
return 1;
|
||||
default:
|
||||
return 5;
|
||||
}
|
||||
})();
|
||||
table = $.x("following::br[@clear][1]/preceding::table[" + num + "]", a);
|
||||
while ((prev = table.previousSibling) && (prev.nodeName === 'TABLE')) {
|
||||
$.rm(prev);
|
||||
|
||||
@ -400,7 +400,10 @@ expandThread =
|
||||
when '-'
|
||||
a.textContent = a.textContent.replace '-', '+'
|
||||
#goddamit moot
|
||||
num = if g.BOARD is 'b' then 3 else if g.BOARD is 't' then 1 else 5
|
||||
num = switch g.BOARD
|
||||
when 'b' then 3
|
||||
when 't' then 1
|
||||
else 5
|
||||
table = $.x "following::br[@clear][1]/preceding::table[#{num}]", a
|
||||
while (prev = table.previousSibling) and (prev.nodeName is 'TABLE')
|
||||
$.rm prev
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user