diff --git a/4chan_x.user.js b/4chan_x.user.js index 04aa557c2..6f7528878 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.el)) 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..4528a9e34 100644 --- a/changelog +++ b/changelog @@ -1,6 +1,8 @@ master - Mayhem General performance improvements. +- noface + Add unique ID to filter. 2.28.0 - ahodesuka diff --git a/script.coffee b/script.coffee index ec7e7a97e..787810371 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.el + 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: