Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. // ==UserScript==
  2. // @name kilxor_20150204
  3. // @namespace
  4. // @description
  5. // @include https://ilx.wh3rd.net/*
  6. // @include https://ilx.p3r.net/*
  7. // @include https://www.ilxor.com/*
  8. // @include https://ilxor.com/*
  9. // ==/UserScript==
  10.  
  11. // YOU NEED TO MODIFY THE fules LINE BELOW
  12. // =======================================
  13. // NB Names are now regular expressions so they should look like:
  14. // /oog/ - match a part of name
  15. // /^koo/ - match start of name
  16. // /ogs$/ - match end of name
  17. // /^koogs$/ - match entire name
  18. // /\uABCD/ - match unicode character ABCD (hexadecimal)
  19. var fules = [/Morb/,/some_losers_username_here/];
  20.  
  21. var posts;
  22. // <em class='name'><a href='/ILX/Pages/webmail.jsp?messageid=33&boardid=40&threadid=52468'>lfam</a></em>
  23. // get all posts
  24. posts = document.evaluate("//*[@class='posterinfo']/*[@class='name']",
  25. document,
  26. null,
  27. XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
  28. null);
  29.  
  30. blocked = false;
  31. var count = 0
  32. if (posts.snapshotLength != 0) {
  33. count++;
  34. //alert("Posts: " + posts.snapshotLength); // acd DEBUG
  35. for (var i = 0; i < posts.snapshotLength; i++) {
  36. var thisLink = posts.snapshotItem(i);
  37. //alert("ThisLink: " + thisLink); // acd DEBUG
  38. var poster = thisLink.firstChild.firstChild.nodeValue;
  39.  
  40. if (poster != null) {
  41. for(var k = 0; k < fules.length; k++) {
  42. fule = fules[k];
  43. //alert("Poster: [" + poster + "] Fule: [" + fule + "]"); // acd DEBUG
  44. // if this post belongs to this fule then blank it
  45. if (poster.match(fule)) {
  46. // find enclosing message
  47. div = thisLink;
  48. do {
  49. div = div.parentNode;
  50. //alert("Div:" + div + " : " + div.className);
  51. } while (div.className != "message");
  52. // div = thisLink.parentNode.parentNode;
  53. div.innerHTML = "";
  54. blocked = true;
  55. break;
  56. }
  57. }
  58. }
  59. }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement