Tiny refactor.
This commit is contained in:
parent
f2ff7ab1be
commit
c6a44d095c
@ -564,15 +564,15 @@
|
|||||||
if (boards !== 'global' && boards.split(',').indexOf(g.BOARD) === -1) {
|
if (boards !== 'global' && boards.split(',').indexOf(g.BOARD) === -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
try {
|
if (key === 'md5') {
|
||||||
if (key === 'md5') {
|
regexp = regexp[1];
|
||||||
regexp = regexp[1];
|
} else {
|
||||||
} else {
|
try {
|
||||||
regexp = RegExp(regexp[1], regexp[2]);
|
regexp = RegExp(regexp[1], regexp[2]);
|
||||||
|
} catch (err) {
|
||||||
|
alert(err.message);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
alert(e.message);
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
op = ((_ref2 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref2[1] : void 0) || 'no';
|
op = ((_ref2 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref2[1] : void 0) || 'no';
|
||||||
stub = (function() {
|
stub = (function() {
|
||||||
|
|||||||
@ -437,17 +437,17 @@ Filter =
|
|||||||
if boards isnt 'global' and boards.split(',').indexOf(g.BOARD) is -1
|
if boards isnt 'global' and boards.split(',').indexOf(g.BOARD) is -1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try
|
if key is 'md5'
|
||||||
if key is 'md5'
|
# MD5 filter will use strings instead of regular expressions.
|
||||||
# MD5 filter will use strings instead of regular expressions.
|
regexp = regexp[1]
|
||||||
regexp = regexp[1]
|
else
|
||||||
else
|
try
|
||||||
# Please, don't write silly regular expressions.
|
# Please, don't write silly regular expressions.
|
||||||
regexp = RegExp regexp[1], regexp[2]
|
regexp = RegExp regexp[1], regexp[2]
|
||||||
catch e
|
catch err
|
||||||
# I warned you, bro.
|
# I warned you, bro.
|
||||||
alert e.message
|
alert err.message
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Filter OPs along with their threads, replies only, or both.
|
# Filter OPs along with their threads, replies only, or both.
|
||||||
# Defaults to replies only.
|
# Defaults to replies only.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user