CSS/User script

Message Bookmarked
Bookmark Removed

Could someone create a .css, grease monkey script or user script that would allow me to filter out threads byregular expressions performed of the thrwad title?

Ed, Wednesday, 25 June 2008 15:13 (seventeen years ago)

That'd be pretty easy to do in Greasemonkey. If I catch a few spare moments, I'll do it for ya.

libcrypt, Wednesday, 25 June 2008 15:26 (seventeen years ago)

I think we would all understand the example script best if it had the regular expression "Your favourite jokes about" used for demonstration purposes.

BLACK BEYONCE, Wednesday, 25 June 2008 15:29 (seventeen years ago)

that wouldn't actually work on any of them :(

MPx4A, Wednesday, 25 June 2008 15:41 (seventeen years ago)

fucking britishes :(

MPx4A, Wednesday, 25 June 2008 15:41 (seventeen years ago)

post edit means never having to admit you're wrong

BLACK BEYONCE, Wednesday, 25 June 2008 15:52 (seventeen years ago)

Much obliged if you can, libcrypt.

Ed, Wednesday, 25 June 2008 16:24 (seventeen years ago)

Minimally tested script for site new answers only. Off to meeting so will debug later.


// ==UserScript==
// @name Filter REGEX Titles on ILX::SNA
// @namespace http://www.ilxorlove.com/
// @description Filter Site New Answers on ilxor.com by REGEX title matching
// @include http://www.ilxor.com/ILX/SiteNewAnswersControllerServlet
// ==/UserScript==

var linkMatcher = /\/ILX\/ThreadSelectedControllerServlet\?boardid=(\d+)\&threadid=(\d+)(.*)/
var titleMatcher = [ /your favou?rite jokes/i, /mongrels/i, /eeepc/i ]
var anchors = document.getElementsByTagName("a")

for ( var ii = 0; ii < anchors.length; ii++ )
{
if ( linkMatcher.exec(anchors[ ii ].getAttribute("href")) != undefined )
{
for ( jj = 0; jj < titleMatcher.length; jj++ )
{
if ( titleMatcher[ jj ].exec(anchors[ ii ].innerHTML) != undefined )
{
var thread = anchors[ ii ].parentNode
while ( thread != undefined && thread.nodeName != "DIV" && thread.className != "thread" )
{
thread = thread.parentNode
}

thread.style.display = "none"
}
}
}
}

libcrypt, Wednesday, 25 June 2008 16:43 (seventeen years ago)

Ta muchly, seems to work very effectively with greasekit for both Site New Answers and ILE new answers.

Ed, Wednesday, 25 June 2008 17:58 (seventeen years ago)

Works on Greasemonkey too, good job.

Ed, Thursday, 26 June 2008 09:24 (seventeen years ago)

wow, i will try this

the new greasemonkey icon sucks tho

blueski, Thursday, 26 June 2008 10:36 (seventeen years ago)

Greasemorrisey morelike.

Ed, Thursday, 26 June 2008 11:54 (seventeen years ago)

wow @ greasekit

g-kit, Thursday, 26 June 2008 12:50 (seventeen years ago)


You must be logged in to post. Please either login here, or if you are not registered, you may register here.