No Dick-Pics Reddit /r/gonewild

No Dick-Pics in /r/gonewild

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==//
// @name        No Dick-Pics Reddit /r/gonewild
// @description No Dick-Pics in /r/gonewild
// @version     1.3
// @include     https://www.reddit.com/r/gonewild/*
// @run-at      document-start
// @require     https://greasyfork.org/scripts/12228/code/setMutationHandler.js
// @namespace https://greasyfork.org/users/14346
// ==/UserScript==

// process the already loaded portion of the page
process(document.querySelectorAll(
    'a.title'
));

// process the stuff loaded from now on
setMutationHandler(
    document,
    'a.title',
    process
);

function process(nodes) {
    for (var i=0, n; (n=nodes[i++]); ) {
        if (n.textContent.match(/^(?!(.*)?(\[|\(|\{)([0-9]{2}? ?(,|-|\/)? ?)?f(emale)?( ?(,|-|\/)? ?[0-9]{2}?)?(\}|\)|\]))(.*)?(\[|\(|\{)([0-9]{2}? ?(,|-|\/)? ?)?(m( ?(,|-|\/|4)? ?m(.*)?|e|y|an|en|ales?| ?(,|-|\/)? ?4f(.*)?)?)( ?(,|-|\/)? ?[0-9]{2}?)?(\}|\)|\])(?!(.*)?(\[|\(|\{)([0-9]{2}? ?(,|-|\/)? ?)?f(emale)?( ?(,|-|\/)? ?[0-9]{2}?)?(\}|\)|\]))(.*)?$/i)) {
            (n.closest('.thing') || n.parentNode).remove();
        }
        if (n.textContent.match(/(\[|\(|\{)([0-9]{2}? ?(,|-|\/)? ?)?(t|cd|\?)( ?(,|-|\/)? ?[0-9]{2}?)?(\}|\)|\])/i)) {
            (n.closest('.thing') || n.parentNode).remove();
        }
        if (n.textContent.match(/(\[|\(|\{).*(,|-|\/| ) ?[0-9]{2}? ?(,|-|\/)? ?(t|cd|\?) ?(,|-|\/)? ?[0-9]{2}?(\}|\)|\])/i)) {
            (n.closest('.thing') || n.parentNode).remove();
        }
        if (n.textContent.match(/(\[|\(|\{)[0-9]{2}? ?(,|-|\/)? ?(t|cd|\?) ?(,|-|\/)? ?[0-9]{2}?(,|-|\/| ).*(\}|\)|\])/i)) {
            (n.closest('.thing') || n.parentNode).remove();
        }
    }
}