User:AJasperInAThing/global.js

$('[name="message"]').keypress(function (e) {    if (e.which === 32 || e.which === 13) {         switch (this.msg) { case '@%hello':             this.msg = 'Hello.';             break;             case '@%memes':             this.msg = 'Only the dankest, my friend.'             break;

case '@%hoip': this.msg = 'HAIL THE ALL MIGHTY HOIP!' break;

case '@%rand1': var rand1 = math.random(1,5); if (rand1 == 1) then this.msg = '1'; if (rand1 == 2) then this.msg = '2'; if (rand1 == 3) then this.msg = '3'; if (rand1 == 4) then this.msg = '4'; if (rand1 == 5) then this.msg = '5'; break; } } })