User:Catuse167/wikia.js

/* Hide comments */ $( hideComments( ["Ralok"], "this comment is hidden" ) ); 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 + ' '; }       }    } }