User:Timeshifter/wikia.js

/* Hide comments */

$( hideComments( ["Ralok"], "(spam)" ) );

function hideComments(usernameList, replacementText) { var comments = $('.article-comm-text'); var numComments = comments.size; var numUsers = usernameList.length; for (var i = 0; i < numComments; i++) { for (var j = 0; j < numUsers; j++) { if ($(comments[i].parentNode.parentNode).attr('data-user') === usernameList[j]) { comments[i].innerHTML = ' ' + replacementText + ' '; }       }    } }