Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Improve your {spoiler /prog/} experience

Name: Anonymous 2012-05-26 21:50

// ==UserScript==
// @name           /prog/ cleaner
// @description    Fixes some common annoyances.
// @namespace      http://dis.4chan.org/prog/
// @include        http://dis.4chan.org/*;
// @version        1.0
// ==/UserScript==

(function() {
    var posts = document.getElementsByClassName('post');
    for (var i = posts.length - 1; i >= 0; --i) {
        var author = posts[i].getElementsByTagName('span')[3];
        var trip = posts[i].getElementsByTagName('span')[4];
        var body = posts[i].getElementsByTagName('blockquote')[0];

        if (posts[i].getElementsByTagName('code').length == 0 &&
             !author.innerHTML.match(/mailto:sage/) ||
            trip.textContent == '!MhMRSATORI!FBeUS42x4uM+kgp')
            posts[i].parentNode.removeChild(posts[i]);
    }
})();

Name: Anonymous 2012-05-26 22:10

>>1

is there any reason for the loop going backwards?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List