// ==UserScript==
// [USER=16824]Name[/USER] See no evil
// [USER=16824]Name[/USER]space kkkodex
// @include *rpgcodex.net/forums/index.php?threads/*
// @version 1.0
// ==/UserScript==
document.addEventListener('DOMContentLoaded', function(ev) {
var ignoreList = [
'Infinitron',
'Cosmic Misogynerd'
];
var pattern = new RegExp(ignoreList.join('|'));
var messages = document.getElementsByTagName('li');
for (var i = 0; i < messages.length; ++i) {
var msg = messages[i];
if (msg.hasAttribute('class') && msg.getAttribute('class').indexOf('message') != -1) {
var found = msg.getAttribute('data-author').match(pattern);
if (found) {
(function(msg) {
this.style.cursor = 'pointer';
this.style.border = 'solid gray 1px';
this.style.background = '#c30';
this.style.fontSize = '20px';
this.appendChild(document.createTextNode(found[0]));
this.addEventListener('click', function(ev) {
msg.style.display = 'block';
this.parentNode.removeChild(this);
}, false);
msg.parentNode.insertBefore(this, msg);
}).apply(document.createElement('div'), [messages[i]]);
msg.style.display = 'none';
}
}
}
}, false);