fixed up chat some more
This commit is contained in:
parent
425350d402
commit
9bab32d2ae
18 changed files with 1204 additions and 180 deletions
37
modules/chat/js/chat_ws.js
Normal file
37
modules/chat/js/chat_ws.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
document.domain = "funch.at";
|
||||
|
||||
function notice() {
|
||||
if(not!=false){
|
||||
document.getElementById('notice').play();
|
||||
}
|
||||
}
|
||||
function changenotice(file) {
|
||||
var zeit = new Date();
|
||||
var ms = zeit.getMilliseconds();
|
||||
var audio = $('#notice').empty();
|
||||
var newSrc = $("<source>").attr("src", "//funch.at/modules/chat/sound/"+file+"_notice.ogg?id="+ms).appendTo(audio);
|
||||
var newSrc2 = $("<source>").attr("src", "//funch.at/modules/chat/sound/"+file+"_notice.mp3?id="+ms).appendTo(audio);
|
||||
/****************/
|
||||
audio[0].pause();
|
||||
audio[0].load();
|
||||
}
|
||||
|
||||
function play(source) {
|
||||
if(window.parent.bgmusic!=false){
|
||||
updateSource(source);
|
||||
document.getElementById('audioPlayer').play();
|
||||
}
|
||||
}
|
||||
function reload_locations() {
|
||||
window.parent.refresh();
|
||||
}
|
||||
function pause() {
|
||||
document.getElementById('audioPlayer').pause();
|
||||
}
|
||||
|
||||
function updateSource(file) {
|
||||
if(file!=undefined){
|
||||
$('#oggSource').attr('src',"//funch.at/modules/chat/sound/"+file+".ogg").detach().appendTo($('#audioPlayer'));
|
||||
$('#mp3Source').attr('src',"//funch.at/modules/chat/sound/"+file+".mp3").detach().appendTo($('#audioPlayer'));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue