From 12128ca1536723f48570f6b98328fae2cf2b5639 Mon Sep 17 00:00:00 2001 From: No Face Date: Sat, 3 Mar 2012 08:58:06 +0100 Subject: [PATCH 1/3] Add unqiue ID to filter. Again. --- 4chan_x.user.js | 7 +++++++ changelog | 1 + script.coffee | 9 +++++++++ 3 files changed, 17 insertions(+) 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:

    From 2e824058421792b3e2022dfa7cc03ac72cfbe596 Mon Sep 17 00:00:00 2001 From: No Face Date: Sat, 3 Mar 2012 09:05:09 +0100 Subject: [PATCH 2/3] el --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index b5d5a38ad..0aa061f42 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -633,7 +633,7 @@ }, uniqueid: function(post) { var uniqueid; - if (uniqueid = $('.posteruid', post)) return uniqueid.textContent; + if (uniqueid = $('.posteruid', post.el)) return uniqueid.textContent; return false; }, tripcode: function(post) { diff --git a/script.coffee b/script.coffee index 0f6a5e595..c0ff8bb20 100644 --- a/script.coffee +++ b/script.coffee @@ -557,7 +557,7 @@ filter = name = if post.isOP then $ '.postername', post.el else $ '.commentpostername', post.el name.textContent uniqueid: (post) -> - if uniqueid = $ '.posteruid', post + if uniqueid = $ '.posteruid', post.el return uniqueid.textContent false tripcode: (post) -> From dd53ef3024b122cd797eae39bfd5211c0d190135 Mon Sep 17 00:00:00 2001 From: No Face Date: Sat, 3 Mar 2012 09:08:42 +0100 Subject: [PATCH 3/3] changelog too --- changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index 4d71013e8..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 @@ -12,7 +14,6 @@ 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.