Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMuellenator authored Mar 6, 2024
1 parent b9f7c14 commit 2be83b0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ $(document).ready(function () {

//Enter button
$(document).on("keydown", function (e) {
var x = event.which || event.keyCode;
var x = e.which || e.keyCode;
if (x === 13 || x == 13) {
var consoleLine = $("#" + CurrentId + " " + "input").val();
var consoleLine = $("#" + CurrentId + " input").val();

console.log(consoleLine);
if (bandName != "") bandName += " " + consoleLine;
console.log(`consoleLine: ${consoleLine}`);
console.log(`bandName: ${bandName}`);
bandName += " " + consoleLine;
// if (bandName != "") bandName += " " + consoleLine;
inputValues.push({ id: CurrentId, val: consoleLine });

console.log(inputValues);
Expand All @@ -44,7 +46,7 @@ $(document).on("keydown", function (e) {
}
});
$(document).on("keydown", function (e) {
var x = event.which || event.keyCode;
var x = e.which || e.keyCode;
var line = $("#" + CurrentId + " input");
var length = line.val().length;
if (x != 8) {
Expand Down

0 comments on commit 2be83b0

Please sign in to comment.