vp / LJ Comments Manager

// ==UserScript==
// @name        LJ Comments Manager
// @namespace   vp
// @include     http://*.livejournal.com/*
// @version     0.2
// @grant       none

// ==/UserScript==


// === config begins ===

var users = [
["username_1","hide"],
["username_2","dim"],
["username_3","whiteout"],
["username_4","blackout"],
["username_5","highlight"]
];

var hide_style = "{display: none;}";
var dim_style = "{opacity: 0.2;}";
var whiteout_style = "{background-color: #FFF; color: #FFF;}";
var blackout_style = "{background-color: #000; color: #000;}";
var highlight_style = "{background-color: #FF9;}";

// === config ends ===


var css = document.createElement("style");
css.type = "text/css";
css.innerHTML = "";

var uname;
var umode;
var child;

for( i=0 ; i<users.length ; i++ ) {
    uname = users[i][0];
    umode = users[i][1];
    if( umode=="hide" || umode=="dim" ) child="";
    else child=".b-leaf-article ";
    css.innerHTML += " .comment[data-username='" + uname + "'] " + child + eval(umode + "_style");
}

document.body.appendChild(css);