diff --git a/4chan_x.user.js b/4chan_x.user.js
index 6c15c0c22..b5d5a38ad 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -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 @@
Highlighted OPs will have their threads put on top of board pages by default.
For example: top:yes or top:no.\
\
Name:
\
+ Unique ID:
\
Tripcode:
\
Admin/Mod:
\
E-mail:
\
diff --git a/changelog b/changelog
index 57d039b0a..4d71013e8 100644
--- a/changelog
+++ b/changelog
@@ -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.
diff --git a/script.coffee b/script.coffee
index cad40a7e0..0f6a5e595 100644
--- a/script.coffee
+++ b/script.coffee
@@ -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 =
Highlighted OPs will have their threads put on top of board pages by default.
For example: top:yes or top:no.
Name:
+ Unique ID:
Tripcode:
Admin/Mod:
E-mail: