User:Robyn Grayson/chat.js

importScriptPage('User:Robyn Grayson/chat.js', 'clockwork-planet'); importScriptPage('ChatNotifications/code.js', 'dev'); importScriptPage('ChatScript', 'gmods-hideout'); importScriptPage('ChatButtonsCollectionDeluxe.js', 'dev'); importScriptPage('MediaWiki:ChatEditTools/code2.js', 'dev'); importScriptPage('MediaWiki:CustomChatPings/code.js', 'dev'); importScriptPage('MediaWiki:CapsFirst/code.js', 'dev'); importScriptPage('MessageBlocker/code.js', 'dev'); importScriptPage('LightBlock/code.js', 'dev'); importScriptPage('MediaWiki:FaviconNotifier/code.js', 'dev'); $('[name="message"]').keypress(function (e) {   if (e.which == 32 || e.which == 13) {        switch (this.value) {        case '/greet':            this.value = 'Hiya, welcome to the ' + wgSiteName + ' chat!';            break;        case '/logs':            this.value = 'You can view the chat logs here.';            break;            case '/emotes':            this.value = 'You can view the emoticons here.';            break;        case '/tou':            this.value = 'Wikia\'s Terms of Use can be found here.';            break;         case '/shrug':            this.value = '¯\\_(ツ)_/¯';            break;                    }        var test = "/google";        if (this.value.indexOf(test) > -1 && this.value.indexOf(test) < 8) {            var query = this.value.replace('/google ', '');            query = query.replace(/ /g, "+"); this.value = "http://www.lmgtfy.com/?q=" + query; }   } });