User:Lil' Miss Rarity/chat.js

if (mw.config.get("wgCanonicalSpecialPageName") == "Chat") {

$("textarea[name=message]").keydown(function(e) {       if (e.which == 13) {

var t = $(this).val;

if (t.indexOf("/google") === 0) {

var q = t.replace("/google ", ""); q = q.replace(/ /g, "+");

var u = "https://encrypted.google.com/#q=" + q;

$(this).val(u); }       }     }); }