4chan Thread Filter

By aeosynth Last update Nov 16, 2008 — Installed 1,456 times.
Script Summary:
Filter threads, expand images. Filters now seperated by semicolon (;). This is to support the RegExp notation {m,n}, which is useful in filtering posts based on character length.
Recently Updated TopicsPosts
ITT: Feature Requests/ Random1
Archived Comments30

this script has 2 topics, 31 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.

Image Hosting

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 (Replies): hides replies which have no image
Hide Blankposts: hides replies which have no image or text
Regular Expressions: allows regular expression search terms. Only use this if you know what you're doing. Click here for a guide.
Sticky: dialog box moves with screen
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' and 'Hide Blankposts'
moar/less: toggles expanded box

In the source are two more preferences -
color: highlight color
inline: makes single images expandable

Because of the name change, you'll probably have to uninstall the previous version, after transfering filters of course.

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 remove all namefags, just enter 'fag' without the quotes as the first search term. You can remove tripcode, email, subject, and image fags the same way.

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 won't always work)

Known Issues


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

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

Memory leak with 4chan thread updater. Edit the updater's source and set RUN_SCRIPTS_ON_NEW_POSTS to false.

TODO


Filter out entire threads w/o requiring 4chan extension
Add style options
Work on 4chanarchive
Work on text boards
Logical operators
Reply/OP, Image/no-Image only filters
Don't filter OP when in reply mode. Done.
Option to not auto-expand front page
Option to not remember choice for 'Hide Text'. Done.
Add a filter for image size/dimensions to get rid of the new 4chan.js spam. It's actually fascinating watching it evolve/mutate.

Version Info


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