forked from server/soundboard
fixed wrong js comment
This commit is contained in:
parent
64102b9396
commit
b6905e566c
@ -84,11 +84,11 @@ function addKeyListeners() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// TODO: make sure that only sound buttons get selected, not ALL a-tags. See d4377e0f49dc8dd5787f4466c9ab7f7e7cd37ec5#note_857
|
|
||||||
// keyboard listener for playing sounds using enter key
|
// keyboard listener for playing sounds using enter key
|
||||||
var all_a_s = document.getElementsByTagName("a");
|
var buttons = document.querySelectorAll(".sound");
|
||||||
for(i=0; i<all_a_s.length; i++) {
|
|
||||||
all_a_s[i].addEventListener('keypress', async function (e) {
|
buttons.forEach(function(item) {
|
||||||
|
item.firstChild.addEventListener('keypress', async function (e) {
|
||||||
var key = e.keyCode;
|
var key = e.keyCode;
|
||||||
var source = e.target;
|
var source = e.target;
|
||||||
// keylistener for enter or ctrl+enter (which is k10 on chrome)
|
// keylistener for enter or ctrl+enter (which is k10 on chrome)
|
||||||
@ -103,7 +103,7 @@ function addKeyListeners() {
|
|||||||
source.classList.remove("sound-pressed");
|
source.classList.remove("sound-pressed");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ function ajaxRequest(url){
|
|||||||
/*
|
/*
|
||||||
* Switches between local and remote playback mode.
|
* Switches between local and remote playback mode.
|
||||||
* Additionally changes the button text and its color so that the user has a visible feedback.
|
* Additionally changes the button text and its color so that the user has a visible feedback.
|
||||||
/*
|
*/
|
||||||
function toggleLocalMode() {
|
function toggleLocalMode() {
|
||||||
toggleButton = document.getElementById("local-mode-button").children[0];
|
toggleButton = document.getElementById("local-mode-button").children[0];
|
||||||
if(localModeEnabled){
|
if(localModeEnabled){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user