-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.js
30 lines (25 loc) · 1.11 KB
/
popup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var gong = [];
gong.push('http://www.wavlist.com/soundfx/026/cymbal3.wav');
gong.push('http://www.wavlist.com/soundfx/026/gong2.wav');
gong.push('http://www.wavlist.com/soundfx/026/gong1.wav');
gong.push('https://sampleswap.org/samples-ghost/DRUMS%20and%20SINGLE%20HITS/gongs%20and%20super%20crashes/276[kb]big-boomy-gong.wav.mp3');
gong.push('https://sampleswap.org/samples-ghost/DRUMS%20and%20SINGLE%20HITS/gongs%20and%20super%20crashes/861[kb]Kringarie-gong.wav.mp3');
document.addEventListener('DOMContentLoaded', function() {
var button = document.getElementById("jumper-ext-button");
var list = document.getElementById("list");
button.addEventListener('click', function(){
var gongID = document.querySelector('.gong:checked').value;
// alert(gongID+" , " + gong[gongID] )
var audio = new Audio(gong[gongID]);
audio.play()
button.className = 'animated tada'
list.className = 'animated rubberBand'
setTimeout(function(){
button.className = ''
list.className = ''
}, 1000)
})
});
function renderStatus(statusText) {
document.getElementById('status').textContent = statusText;
}