From f8300d1672b00bb040352c1608d8d1384110421d Mon Sep 17 00:00:00 2001 From: thely314 <146166116+thely314@users.noreply.github.com> Date: Fri, 8 Dec 2023 22:27:21 +0800 Subject: [PATCH] Delete source/js/index.js --- source/js/index.js | 63 ---------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 source/js/index.js diff --git a/source/js/index.js b/source/js/index.js deleted file mode 100644 index 7df23c5..0000000 --- a/source/js/index.js +++ /dev/null @@ -1,63 +0,0 @@ -var song_list=["果てなき風の軌跡さえ~破~","琪露诺的完美算术教室","琪露诺的完美算数教室⑨周年版","NEEDY GIRL OVERDOSE","INTERNET YAMERO","二人の魔法","Sweet Treasure (Inst.)"]; -var i = 0; - -var audioPlayer = document.getElementById("audioPlayer"); - -//初始化音量 -window.onload = function() { - var audio = document.getElementById("audioPlayer"); - audio.volume = 0.2; -}; - -function play() { - if (audioPlayer.paused) { - audioPlayer.play(); - document.getElementById('musicImg').src="source/img/pauseButton.png"; - }else{ - audioPlayer.pause(); - document.getElementById('musicImg').src="source/img/startButton.png"; - } -} - -function end() { - audioPlayer.pause(); - document.getElementById('musicImg').src="source/img/startButton.png"; - audioPlayer.currentTime = 0;//让音乐从头播放 -} - -function change(n){ - i=n; - audioPlayer.src = "source/music/"+song_list[i]+".mp3"; - audioPlayer.load(); - audioPlayer.play(); - document.getElementById('musicImg').src="source/img/pauseButton.png"; - changeShowedText(i); -} - -function next(){ - if(i<6)//n-1 - { - i+=1; - } - else{ - i=0; - } - audioPlayer.src = "source/music/"+song_list[i]+".mp3"; - audioPlayer.load(); - audioPlayer.play(); - document.getElementById('musicImg').src="source/img/pauseButton.png"; - changeShowedText(i); -} - -function changeVolume(value) { - var audio = document.getElementById("audioPlayer"); - audio.volume = value; - - var volumeLabel = document.getElementById("volumeLabel"); - volumeLabel.innerText = "音量: " + (value * 100) + "%"; -} - -function changeShowedText(i){ - var showedText = document.getElementById("currentMusic"); - showedText.innerText = "当前播放: " + song_list[i]; -}