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