SBSChat+ is an extension for smilebasicsource.com/chat that creates sounds effects that are very convinient. There are also other features and many more to come. To get the initial code, expand this. take the following code to http://smilebasicsource.com/editChatJS and input it at the BEGINNING. Then save, and reload the chat and you have a fully installed plugin!
If there is ever an update available for SBSChat+, a notification will appear on entry linking to a page that gives you the new version's code.
Current Version 1.0 Initial release
file mirror: http://urlsh.x10.mx/resources/SBSChatPlus (Always shows current version)
(Lumage, please don't erase this. It's the only thread I'll make for it.)
v1.0
var pingname=""; var pingchat=""; var sounds=true; var name=document.querySelector("[data-username]").dataset.username; var odm = displayMessage; var b=new Audio("http://urlsh.x10.mx/resources/click.mp3"); var jingle=readStorage("jingle"); var current_user_pinging=""; var version=1; if(jingle){ var d= new Audio(jingle); d.play(); } var st=readStorage("Sound"); if(!st){ writeStorage("Sound","http://urlsh.x10.mx/resources/Ding.mp3"); st="http://urlsh.x10.mx/resources/Ding.mp3"; } var a=new Audio(st); setTimeout(function(){systemMessage("To view SBSChat+ commands, type /cmds.");},100); //setTimeout(function(){sendMessage("/me is using SBSChat+! You can ping them using @"+name+".");},1000); commands.push(new Command("notifsound", function(param) { a=new Audio(param); writeStorage("Sound",param); })); commands.push(new Command("setjingle", function(sss) { writeStorage("jingle",sss); })); commands.push(new Command("cmds", function(){ systemMessage("Commands:\n/togglesounds - Toggle pings on/off\n/notifsound - Changes Ping sound for @user (10 second cut limit)\n/setjingle - Sets a jingle to be played upon entry. Set to 'none' to play nothing."); })); commands.push(new Command("togglesounds", function() { if (sounds===true) {sounds=false; systemMessage("Alerts off.");}else{sounds=true;systemMessage("Alerts on."); } })); displayMessage = function(d){ if (d.type=="message"){ if(d.username!=name){ if (sounds===true){ if (current_user_pinging!=d.username){ b.play();} } if (d.message.indexOf("@"+name)!=-1) { pingchat=d.message; pingname=d.username; if (sounds===true){ a.play(); setTimeout(function(){a.pause();},10000); }} if (d.username==name) { if (pingname!=="") systemMessage(pingname+": "+pingchat); pingname=""; } } current_user_pinging=d.username; } return odm(d); }; //Replace "/query/chatJS" with your URL genericXHRSimple("http://urlsh.x10.mx/resources/SBSChatPlusUpdate.php", function(output) { if (output=="UPDATE"+(version+1)){warningMessage("A new update to SBSChat+ is available! Go to http://urlsh.x10.mx/resources/SBSChatPlus to update!");} });