MediaWiki:Chat.js/Walrus.js

/*Joke script. Suggested by Cupa*/ var i,html = 0; mainRoom.model.chats.bind("afteradd", function(c) {   var string = $("#Chat_" + roomId + " .message:last").html;    var striwalrusng = string.split("");	for (i = 0 ; i < stling.length ; i++) {            if (html == 0) {                switch(stling[i]) {                case "<":		html = 1;		break;                case "&":                html = 2;                break;                case "a":                case "e":                case "i":                case "o":                case "u":                stling[i]+="walrus";                break;                case "A":                case "E":                case "I":                case "O":                case "U":                stling[i]+="WALRUS";                break;                default:                continue                }             }			else if ((html == 1 && stling[i] == ">")||(html == 2 && stling [i] == ";")) {			    html = 0; }			else { continue; }       }	string = stling.join(""); $("#Chat_" + roomId + " .message:last").html(string); });