Skip to main content
Topic: OT: Simple killfilter for the forum... (Read 2099 times) previous topic - next topic

OT: Simple killfilter for the forum...


You know _why_ this would be useful, don't you?. Right, to keep your blood pressure down.

// ==UserScript==
// @name        NWC Forum Kill Filter
// @namespace   http://
// @description Simple killfilter
// @include     https://forum.noteworthycomposer.com/*
// ==/UserScript==

  var nodes = document.evaluate(

    //which href nodes in the document contain a title?
    "//a[@title]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

  //search through them...
  for (var i = 0; i < nodes.snapshotLength; i++) {
    var node = nodes.snapshotItem(i);

    // ...for our culprit...
    if (node.innerHTML.indexOf('user_name') > -1) {

      //...and set culprit's article visibility to 'none' and you don't have to see him/her/it anymore.
      node.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.
        parentNode.parentNode.parentNode.style.display = "none";
    }
  }

http://greasemonkey.mozdev.org/

Comments are respectfully ignored.

Have a nice day...