Skip to content

Instantly share code, notes, and snippets.

@bsdf
Created August 31, 2012 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsdf/3556268 to your computer and use it in GitHub Desktop.
Save bsdf/3556268 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name kilxor_20090809
// @namespace
// @description
// @include http://ilx.wh3rd.net/*
// @include http://ilx.p3r.net/*
// @include http://www.ilxor.com/*
// ==/UserScript==
// YOU NEED TO MODIFY THE fules LINE BELOW
// =======================================
// NB Names are now regular expressions so they should look like:
// /oog/ - match a part of name
// /^koo/ - match start of name
// /ogs$/ - match end of name
// /^koogs$/ - match entire name
// /\uABCD/ - match unicode character ABCD (hexadecimal)
var fules = [/koogs/,/fule2/];
var posts;
// <em class='name'><a href='/ILX/Pages/webmail.jsp?messageid=33&boardid=40&threadid=52468'>lfam</a></em>
// get all posts
posts = document.evaluate("//*[@class='posterinfo']/*[@class='name']",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
blocked = false;
var count = 0
if (posts.snapshotLength != 0) {
count++;
for (var i = 0; i < posts.snapshotLength; i++) {
var thisLink = posts.snapshotItem(i);
var poster = thisLink.firstChild.firstChild.nodeValue;
if (poster != null) {
for(var k = 0; k < fules.length; k++) {
fule = fules[k];
// if this post belongs to this fule then blank it
if (poster.match(fule)) {
// find enclosing message
div = thisLink;
do {
div = div.parentNode;
} while (div.className != "message");
div.parentNode.removeChild(div);
break;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment