Add Country filtering.
This commit is contained in:
parent
abfc9cbe49
commit
9f329ecd26
@ -156,6 +156,7 @@
|
||||
email: ['# Filter any e-mails that are not `sage` on /a/ and /jp/:', '#/^(?!sage$)/;boards:a,jp'].join('\n'),
|
||||
subject: ['# Filter Generals on /v/:', '#/general/i;boards:v;op:only'].join('\n'),
|
||||
comment: ['# Filter Stallman copypasta on /g/:', '#/what you\'re refer+ing to as linux/i;boards:g'].join('\n'),
|
||||
country: [''].join('\n'),
|
||||
filename: [''].join('\n'),
|
||||
dimensions: ['# Highlight potential wallpapers:', '#/1920x1080/;op:yes;highlight;top:no;boards:w,wg'].join('\n'),
|
||||
filesize: [''].join('\n'),
|
||||
@ -706,6 +707,13 @@
|
||||
}
|
||||
return text.join('');
|
||||
},
|
||||
country: function(post) {
|
||||
var flag;
|
||||
if (flag = $('.countryFlag', post.el)) {
|
||||
return flag.title.replace('Country: ', '');
|
||||
}
|
||||
return false;
|
||||
},
|
||||
filename: function(post) {
|
||||
var file, fileInfo;
|
||||
fileInfo = post.fileInfo;
|
||||
@ -2476,6 +2484,7 @@
|
||||
<option value=email>E-mail</option>\
|
||||
<option value=subject>Subject</option>\
|
||||
<option value=comment>Comment</option>\
|
||||
<option value=country>Country</option>\
|
||||
<option value=filename>Filename</option>\
|
||||
<option value=dimensions>Image dimensions</option>\
|
||||
<option value=filesize>Filesize</option>\
|
||||
|
||||
@ -90,6 +90,9 @@ Config =
|
||||
'# Filter Stallman copypasta on /g/:'
|
||||
'#/what you\'re refer+ing to as linux/i;boards:g'
|
||||
].join '\n'
|
||||
country: [
|
||||
''
|
||||
].join '\n'
|
||||
filename: [
|
||||
''
|
||||
].join '\n'
|
||||
@ -556,6 +559,10 @@ Filter =
|
||||
for i in [0...nodes.snapshotLength]
|
||||
text.push if data = nodes.snapshotItem(i).data then data else '\n'
|
||||
text.join ''
|
||||
country: (post) ->
|
||||
if flag = $ '.countryFlag', post.el
|
||||
return flag.title.replace 'Country: ', ''
|
||||
false
|
||||
filename: (post) ->
|
||||
{fileInfo} = post
|
||||
if fileInfo and file = $ '.fileText > span', fileInfo
|
||||
@ -1914,6 +1921,7 @@ Options =
|
||||
<option value=email>E-mail</option>
|
||||
<option value=subject>Subject</option>
|
||||
<option value=comment>Comment</option>
|
||||
<option value=country>Country</option>
|
||||
<option value=filename>Filename</option>
|
||||
<option value=dimensions>Image dimensions</option>
|
||||
<option value=filesize>Filesize</option>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user