Hide ill posts

Let sunshine take over Huasing!

נכון ליום 30-03-2017. ראה הגרסה האחרונה.

// ==UserScript==
// @name         Hide ill posts
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  Let sunshine take over Huasing!
// @author       Nevermoi
// @match        http://bbs.huasing.org/sForum/*.php*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var banList = ['HitmanYK'];

    for(var i = 0; i < banList.length; i++) {
        killThemAll(banList[i]);
    }

    function killThemAll(name) {
        var them = $("a[title="+ name +"]");
        var targets = [];
        for(var i = 0; i < them.length; i++) {
            var parents = $(them[i]).parents();
            //by inspecting dom, the 3rd element is div.brow2
            targets.push(parents[2]);
        }

        for(var j = 0; j < targets.length; j++) {
            $(targets[j]).hide();
        }
    }
})();