FANDOM


So recently I've been working on a JS filter for the chat.
But, with chat not working, I'm removing it, just in case that's causing the problems.


String.prototype.repeat = function(num){
return new Array(num + 1).join(this);
}

var filter = ['swag', 'yolo'];

$('body').html(function(i, txt){

// iterate over all words
for(var i=0; i<filter.length; i++){

// Create a regular expression and make it global
var pattern = new RegExp('\\b' + filter[i] + '\\b', 'g');

// Create a new string filled with '*'
var replacement = '*'.repeat(filter[i].length);

txt = txt.replace(pattern, replacement);
}

// returning txt will set the new text value for the current element
return txt;

});p


EDIT: After extensive testing on an unused wiki, I have found no evidence to suggest that this filter was the cause of any chat related problems. Therefore, it is only reasonable to assume the two incidents were unrelated.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.