Initial commit
This commit is contained in:
commit
43ad32700c
7085 changed files with 447606 additions and 0 deletions
54
modules/chat/chat.js
Normal file
54
modules/chat/chat.js
Normal file
|
@ -0,0 +1,54 @@
|
|||
document.domain = "ponytopia.net";
|
||||
|
||||
function notice() {
|
||||
document.getElementById('notice').play();
|
||||
}
|
||||
function play(source) {
|
||||
if(window.parent.bgmusic!=false){
|
||||
updateSource(source);
|
||||
document.getElementById('audioPlayer').play();
|
||||
}
|
||||
}
|
||||
function changenotice(file) {
|
||||
var zeit = new Date();
|
||||
var ms = zeit.getMilliseconds();
|
||||
var audio = $('#notice').empty();
|
||||
var newSrc = $("<source>").attr("src", "//chat.ponytopia.net/modules/chat/sound/"+file+"_notice.ogg?id="+ms).appendTo(audio);
|
||||
var newSrc2 = $("<source>").attr("src", "//chat.ponytopia.net/modules/chat/sound/"+file+"_notice.mp3?id="+ms).appendTo(audio);
|
||||
audio[0].pause();
|
||||
audio[0].load();
|
||||
}
|
||||
|
||||
function reload_locations() {
|
||||
window.parent.refresh();
|
||||
}
|
||||
function pause() {
|
||||
document.getElementById('audioPlayer').pause();
|
||||
}
|
||||
var as=true;
|
||||
var asoff=false;
|
||||
function doscroll() {
|
||||
if (as != false && asoff==false) {
|
||||
window.scrollTo(1, 500000);
|
||||
}
|
||||
window.setTimeout("doscroll()", 200);
|
||||
}
|
||||
function scroll_toggle() {
|
||||
if(as==false){
|
||||
as=true;
|
||||
window.scroll(1, 500000);
|
||||
}else{
|
||||
as=false;
|
||||
}
|
||||
|
||||
}
|
||||
doscroll();
|
||||
function updateSource(file) {
|
||||
var zeit = new Date();
|
||||
var ms = zeit.getMilliseconds();
|
||||
var audio = $('#audioPlayer');
|
||||
$('#oggSource').attr('src',"//chat.ponytopia.net/modules/chat/sound/"+file+".ogg?id="+ms).detach().appendTo($('#audioPlayer'));
|
||||
$('#mp3Source').attr('src',"//chat.ponytopia.net/modules/chat/sound/"+file+".mp3?id="+ms).detach().appendTo($('#audioPlayer'));
|
||||
audio[0].pause();
|
||||
audio[0].load();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue