Update app.js
This commit is contained in:
@@ -754,10 +754,13 @@ var allFeaturesLimit = [
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var createLi = false;
|
||||||
|
|
||||||
|
// function addingItems() {
|
||||||
allFeaturesTextAddBtn.map((value, index) => {
|
allFeaturesTextAddBtn.map((value, index) => {
|
||||||
if (value !== null) {
|
if (value !== null) {
|
||||||
value.addEventListener("click", () => {
|
value.addEventListener("click", () => {
|
||||||
if (value == messagesTextAddBtn) {
|
if ((value == messagesTextAddBtn) && (createLi === true)) {
|
||||||
// custom message
|
// custom message
|
||||||
let messageName = document.getElementById("inputText13").value;
|
let messageName = document.getElementById("inputText13").value;
|
||||||
let scrollSpeed1 = document.getElementById("inputScrollSpeed13").value;
|
let scrollSpeed1 = document.getElementById("inputScrollSpeed13").value;
|
||||||
@@ -801,6 +804,7 @@ allFeaturesTextAddBtn.map((value, index) => {
|
|||||||
// getCustomMsg
|
// getCustomMsg
|
||||||
// ? localStorage.setItem("customMsg", JSON.stringify(newValues))
|
// ? localStorage.setItem("customMsg", JSON.stringify(newValues))
|
||||||
// : localStorage.setItem("customMsg", JSON.stringify([values]));
|
// : localStorage.setItem("customMsg", JSON.stringify([values]));
|
||||||
|
|
||||||
var tag = document.createElement("li");
|
var tag = document.createElement("li");
|
||||||
var msg = "You've reached the maximum limit of items to add for this feature";
|
var msg = "You've reached the maximum limit of items to add for this feature";
|
||||||
|
|
||||||
@@ -814,8 +818,9 @@ allFeaturesTextAddBtn.map((value, index) => {
|
|||||||
allFeatures[index].appendChild(tag);
|
allFeatures[index].appendChild(tag);
|
||||||
changeVarValue();
|
changeVarValue();
|
||||||
addEventOnFeaturesList();
|
addEventOnFeaturesList();
|
||||||
}
|
createLi = false;
|
||||||
}
|
|
||||||
|
}}
|
||||||
} else {
|
} else {
|
||||||
var msg = "You've reached the maximum limit of items to add for this feature";
|
var msg = "You've reached the maximum limit of items to add for this feature";
|
||||||
|
|
||||||
@@ -825,25 +830,20 @@ allFeaturesTextAddBtn.map((value, index) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else{
|
else{
|
||||||
|
|
||||||
|
if (createLi === true) {
|
||||||
var tag = document.createElement("li");
|
var tag = document.createElement("li");
|
||||||
tag.innerHTML = allFeaturesText[index].value;
|
tag.innerHTML = allFeaturesText[index].value;
|
||||||
allFeatures[index].appendChild(tag);
|
allFeatures[index].appendChild(tag);
|
||||||
changeVarValue();
|
changeVarValue();
|
||||||
addEventOnFeaturesList();
|
addEventOnFeaturesList();
|
||||||
|
createLi = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var startButton = document.getElementById("start-btn");
|
|
||||||
// start the display
|
|
||||||
startButton.addEventListener("click", () => {
|
|
||||||
fetch("/start", {
|
|
||||||
method: "PUT",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
var brightnessButton = document.getElementById("brightness-btn");
|
var brightnessButton = document.getElementById("brightness-btn");
|
||||||
// start the display
|
// start the display
|
||||||
brightnessButton.addEventListener("click", () => {
|
brightnessButton.addEventListener("click", () => {
|
||||||
|
Reference in New Issue
Block a user