ajax-chat/public/js/custom.js

39 lines
1.1 KiB
JavaScript

/*
* @package AJAX_Chat
* @author Sebastian Tschan
* @copyright (c) Sebastian Tschan
* @license GNU Affero General Public License
* @link https://blueimp.net/ajax/
*/
// Overriding client side functionality:
/*
// Example - Overriding the replaceCustomCommands method:
ajaxChat.replaceCustomCommands = function(text, textParts) {
return text;
}
*/
ajaxChat.customInitialize = function() {
ajaxChat.addChatBotMessageToChatList("[b]Welcome to Flashii Chat![/b]");
ajaxChat.addChatBotMessageToChatList("[i]the one time i tried to use gimp i got scared and tried closing it and it crashed[/i]");
}
ajaxChat.loadHTML5Sounds=function(){
this.setAudioVolume(this.settings['audioVolume']);
this.sounds = {};
for(var key in this.soundFiles) {
this.sounds[key] = this.dirs['sounds'] + this.soundFiles[key];
}
}
ajaxChat.playHTML5Sound=function(soundID,soundFile){
var snd = document.createElement('audio');
snd.src = soundFile;
snd.volume = this.html5AudioVolume;
snd.play();
}
ajaxChat.setHTML5SoundVolume=function(volume){
this.html5AudioVolume = volume;
}