4chan Thread Filter

By aeosynth Last update Nov 29, 2008 — Installed 1,711 times.
Script Summary:
RegExp powered thread filtering; image expansion
Recently Updated TopicsPosts
Highlighting - Useful?1
ITT: Feature Requests3
Archived Comments30

this script has 3 topics, 34 posts

This script has no reviews.

This script will place thread stats in the upper right corner of the screen. Mouse over them to reveal a dialog box. Inspired by the muon 4chan Filter.

Fuck Yeah Linux!

Thread Stats: click and drag this to move the dialog box
Name-Image: hides replies containing search terms (use a semicolon ';' to seperate terms)
Highlight: highlights replies containing search terms (ditto)
Max Line Breaks: hides replies with more < br > tags than the inputted value. Enter -1 to turn this off.
Expand Images: expands all images
Hide Text: ???
Auto Hide: dialog box auto hides

apply: applies filters (you can also press enter in a text field to do this)
reset: removes all filters except for 'Hide Text'
moar/less: toggles expanded box

In the source are more preferences -
color - highlight color
inline - makes single images expandable
auto_Expand - 'Expand Images' behavior. 2 = expand all, 1 = don't auto-expand front page, 0 = don't auto-expand
sticky - box moves with screen
maxWidth - expanded images wider than this will have a line break between it and text
min_Width/Height - images smaller than this will be hidden when 'Hide Text' is checked
min_Width/Height_Gif - gifs smaller than this will be hidden when 'Hide Text' is checked
show_Highlighted - shows highlighted image stats

To only filter posts which have no image, enter \i at the end of your search term. No spaces!

To filter out entire threads, you must have the 4chan extension installed. Grab it here.

To remove multi-line comments, use the < br > tag. For example, to remove:

.
.
.

type in '.<'br'>.<'br'>.' without the quotes.

To filter out namefags, type 'fag' in the name field.

RegExp Tips


The characters .*+?^${}()|[]/\ are RegExp operators. If you want to use them as normal characters, add a backslash '\'. Thus to filter |_eet $peak, you would enter \|_eet \$peak.

To filter out a post containing BBBAAAAAAAAAWWWWWWWWWWWWWWWWWWWWWWW instead of copy pasting that text into the comment line, you can enter b+a+ww+, which will filter out posts containing one or more 'b's followed by one or more 'a's followed by two or more 'w's. This will filter out posts with bawws of any length, while not filtering on bawdry, bawdy, or bawl.

To filter out THE BESTTHE BESTTHE BEST posts, using 'the best the best' won't work, because there are no spaces between the first 'the best' and the second. We can use the '?' operator though, and modify the filter to 'the best ?the best'. This will filter a post containing the phrase 'the best', followed by zero or one space, followed by 'the best'.

To filter out posts containing only the word 'desu', use: ^desu$
To filter out posts containing one word or less, use: ^\S*$
To filter out posts with n or less characters, use: ^.{0,n}$
To filter out posts containing no text, use: ^$
To filter out posts NOT made by someone with the name 'op', use: [^op] (note: this is case-sensitive and won't always work)
To filter out trip, email, subject, or image fags, use: . (a period)
To filter out posts w/o alphanumerics, use: ^\W*$

Click here for a more thorough guide.

Known Issues


Double image expansion. Disable the 4chan extension's inline imaging feature.

The 4chan extension's comment expander seems to not work anymore.

Doesn't really work with 4chan thread updater. Edit the updater's source and set RUN_SCRIPTS_ON_NEW_POSTS to false to fix the memory leak. Could Anon rewrite this to be compatible? I probably will eventually, but I'm focused on the thread filter right now.

TODO


Filter out entire threads w/o requiring 4chan extension
Board specific filters?
Add style options
Work on 4chanarchive
Work on text boards
Logical operators

Version Info


1.0.1
Add minimum image size for 'Hide Text'.
Improve image expansion.
Add option to only filter replies unattached to an image.
Don't filter OP when in reply mode.
Option to not auto-expand front page.
Don't remember choice for 'Hide Text'.
Allow image filter to see image size/dimensions and work on front page.
Fixed a bug which unhid threads hidden by 4chan extension.
Removed 'Hide Blankposts'. Obsoleted by \i.

1.0.0
Works w/o 4chan extension again
Improved expanded image placement

0.9.6
Works on front page now.
Regular expression filters.
Inline imaging.
Split off wordfilter bypass. Get it here.

0.9.5a
Fixed Auto Hide bugs

0.9.5
Added Auto Hide.
Added Hidden Posts stats.
Added style recognition.
Changed box opening behavior to recognize on-screen position.
Removed 'anonymize' function. Use this or this instead.
Removed 'zap embeds' function. Use this instead.
Improved filtering.
Fixed highlighting to work through Stylish (though it doesn't look that great).

0.9.4a
Fixed a bug which caused dialog box to take up too much space while loading.

0.9.4
Added newline filtering
Dialog box can now snap to all sides
Fixed blankpost filtering

0.9.3
Fixed 'Sticky' to remember choice. Reorganized dialog box.

0.9.2
Now with editable wordfilter, embedded object zapper, image expander, draggable dialog box, non-alphanumeric filtering, and explicit line break recognition. Code snipets from 4chan Expand All Images used for image expander.

0.9.1
Enhanced faggotry removal, per /r/equest. Fixed a bug which prevented script from automatically working on page load.

0.9.0:
Added thread stats. Added name, tripcode, subject, and image name filtering. Added 'Text Reply' filter. Added wordfilter bypass. Added dialog placement controls. Code snippets from tkirby's/b/ypass used for wordfilter bypass.

Update 1:
Fixed email filter to actually filter email instead of poster name.