ajax-chat/public/js/custom.js

41 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-02-06 16:08:09 +00:00
/*
* @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(){
aO = document.createElement('audio');
aO.id = 'audioObject';
document.body.appendChild(aO);
this.audioObject = document.getElementById('audioObject');
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){
this.audioObject.src = soundFile;
this.audioObject.play();
}
ajaxChat.setHTML5SoundVolume=function(volume){
this.audioObject.volume = volume;
}