Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name kilxor_20150204
- // @namespace
- // @description
- // @include https://ilx.wh3rd.net/*
- // @include https://ilx.p3r.net/*
- // @include https://www.ilxor.com/*
- // @include https://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 = [/Morb/,/some_losers_username_here/];
- 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++;
- //alert("Posts: " + posts.snapshotLength); // acd DEBUG
- for (var i = 0; i < posts.snapshotLength; i++) {
- var thisLink = posts.snapshotItem(i);
- //alert("ThisLink: " + thisLink); // acd DEBUG
- var poster = thisLink.firstChild.firstChild.nodeValue;
- if (poster != null) {
- for(var k = 0; k < fules.length; k++) {
- fule = fules[k];
- //alert("Poster: [" + poster + "] Fule: [" + fule + "]"); // acd DEBUG
- // if this post belongs to this fule then blank it
- if (poster.match(fule)) {
- // find enclosing message
- div = thisLink;
- do {
- div = div.parentNode;
- //alert("Div:" + div + " : " + div.className);
- } while (div.className != "message");
- // div = thisLink.parentNode.parentNode;
- div.innerHTML = "";
- blocked = true;
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement