Merge branch 'master' of github.com:MayhemYDG/4chan-x

This commit is contained in:
Nicolas Stepien 2012-03-03 09:27:32 +01:00
commit 5ff3878360
3 changed files with 18 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.el)) 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

@ -1,6 +1,8 @@
master
- Mayhem
General performance improvements.
- noface
Add unique ID to filter.
2.28.0
- ahodesuka

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.el
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>