fixed wrong js comment

This commit is contained in:
Erhard 2017-08-04 17:39:27 +02:00
parent 64102b9396
commit b6905e566c

View File

@ -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
var all_a_s = document.getElementsByTagName("a");
for(i=0; i<all_a_s.length; i++) {
all_a_s[i].addEventListener('keypress', async function (e) {
var buttons = document.querySelectorAll(".sound");
buttons.forEach(function(item) {
item.firstChild.addEventListener('keypress', async function (e) {
var key = e.keyCode;
var source = e.target;
// keylistener for enter or ctrl+enter (which is k10 on chrome)
@ -103,7 +103,7 @@ function addKeyListeners() {
source.classList.remove("sound-pressed");
}
});
}
});
}
@ -150,7 +150,7 @@ function ajaxRequest(url){
/*
* Switches between local and remote playback mode.
* Additionally changes the button text and its color so that the user has a visible feedback.
/*
*/
function toggleLocalMode() {
toggleButton = document.getElementById("local-mode-button").children[0];
if(localModeEnabled){