User:Temujin96/chat.js

function hideMessages (users) { if (typeof user === "string") users = [users]; for (var i = 0; i < $('.Chat ul li').length; i++) { if (typeof $($('.Chat ul li')[i]).data("user") !== "undefined" && $.inArray($($('.Chat ul li')[i]).data("user"), users) !== -1) { $($('.Chat ul li')[i]).css('display', 'none'); } } } onNewMessage.push(function(el) {	var users = [“Oil4"];	hideMessages(users);	if (typeof $(el).data("user") !== "undefined" && $.inArray($(el).data("user"), users) !== -1) {      		$(el).css('display', 'none');    	} });