User:Raven2015/global.js

importScriptPage('User:Wedkarski/chatpack.js', 'wed');

//Chat commands $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/dasie', 'Da się. Nie wiem jak, ale wiem, że się da.'); } }) $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/lf', '( ͡° ͜ʖ ͡°)'); } }) $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/nie', 'Nie jestem upoważniony do udzielania takich informacji.'); } })

// MATIKOWE EMOTIKONY by Super Miron var faces = [ ["( ͡° ͜ʖ ͡°)", "♫ ♪"], ["¯\_(ツ)_/¯", "༼ つ ◕_◕ ༽つ"], ["ಠ_ಠ", "( ͡° ʖ̯ ͡°)"], ["(✖╭╮✖)", "ʕ ͡·ᴥ ͡· ʔ"] ]; var facesTable = ""; for(var i=0; i'+faces[i][j]+' '; }   facesTable += " "; } $('form#Write').append('Matikony'); $("body").append(' '); function toggleFaces { $("table#faces").toggle; } var inputbox = '#Write textarea[name="message"]'; function inputboxAppend(s){ var inputboxVal = $(inputbox).val; if ( inputboxVal != '' ) { if ( inputboxVal[inputboxVal.length-1] != " " ) { var val = inputboxVal + ' ' + s;		} else { var val = inputboxVal + s;		} $(inputbox).val(''); } else { var val = s;	} $(inputbox).focus; $(inputbox).val(val); } $('table#faces td').click(function{   inputboxAppend($(this).html); }); appendCSS('table#faces td { cursor: pointer !important; }');