Add unqiue ID to filter. Again.

This commit is contained in:
No Face 2012-03-03 08:58:06 +01:00
parent 92714d702c
commit 12128ca153
3 changed files with 17 additions and 0 deletions

View File

@ -138,6 +138,7 @@
},
filter: {
name: ['# Filter any namefags:', '#/^(?!Anonymous$)/'].join('\n'),
uniqueid: ['# Filter a specific ID:', '#/Txhvk1Tl/'].join('\n'),
tripcode: ['# Filter any tripfags', '#/^!/'].join('\n'),
mod: ['# Set a custom class for mods:', '#/Mod$/;highlight:mod;op:yes', '# Set a custom class for moot:', '#/Admin$/;highlight:moot;op:yes'].join('\n'),
email: ['# Filter any e-mails that are not `sage` on /a/ and /jp/:', '#/^(?!sage$)/;boards:a,jp'].join('\n'),
@ -630,6 +631,11 @@
name = post.isOP ? $('.postername', post.el) : $('.commentpostername', post.el);
return name.textContent;
},
uniqueid: function(post) {
var uniqueid;
if (uniqueid = $('.posteruid', post)) return uniqueid.textContent;
return false;
},
tripcode: function(post) {
var trip;
if (trip = $('.postertrip', post.el)) return trip.textContent;
@ -2158,6 +2164,7 @@
<li>Highlighted OPs will have their threads put on top of board pages by default.<br>For example: <code>top:yes</code> or <code>top:no</code>.</li>\
</ul>\
<p>Name:<br><textarea name=name></textarea></p>\
<p>Unique ID:<br><textarea name=uniqueid></textarea></p>\
<p>Tripcode:<br><textarea name=tripcode></textarea></p>\
<p>Admin/Mod:<br><textarea name=mod></textarea></p>\
<p>E-mail:<br><textarea name=email></textarea></p>\

View File

@ -12,6 +12,7 @@ master
- noface
Update imagelimit for /mlp/.
Fix stubs if poster has unique ID.
Add unique ID to filter.
- Mayhem
You can now filter or highlight admin/mod posts.
New sauce parameter. $4: Current board.

View File

@ -58,6 +58,10 @@ config =
'# Filter any namefags:'
'#/^(?!Anonymous$)/'
].join '\n'
uniqueid: [
'# Filter a specific ID:'
'#/Txhvk1Tl/'
].join '\n'
tripcode: [
'# Filter any tripfags'
'#/^!/'
@ -552,6 +556,10 @@ filter =
name: (post) ->
name = if post.isOP then $ '.postername', post.el else $ '.commentpostername', post.el
name.textContent
uniqueid: (post) ->
if uniqueid = $ '.posteruid', post
return uniqueid.textContent
false
tripcode: (post) ->
if trip = $ '.postertrip', post.el
return trip.textContent
@ -1758,6 +1766,7 @@ options =
<li>Highlighted OPs will have their threads put on top of board pages by default.<br>For example: <code>top:yes</code> or <code>top:no</code>.</li>
</ul>
<p>Name:<br><textarea name=name></textarea></p>
<p>Unique ID:<br><textarea name=uniqueid></textarea></p>
<p>Tripcode:<br><textarea name=tripcode></textarea></p>
<p>Admin/Mod:<br><textarea name=mod></textarea></p>
<p>E-mail:<br><textarea name=email></textarea></p>