dropdown menu click disappear prompt msg / update text content of prompt msg

This commit is contained in:
Justin 2023-07-19 00:54:06 +08:00 committed by GitHub
parent 53655e84a4
commit 0163d2002e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3286,3 +3286,19 @@ for (const pageID of pageIDs) {
});
});
}
// for drop down menu, change feature settings prompt text
var selectMenu = document.getElementById("drop");
var pElement = document.getElementById("save-feature-prompt-p");
var pElement2 = document.getElementById("saved-feature-msg-feedback");
// Add an event listener for the "change" event
selectMenu.addEventListener("change", function() {
document.getElementById('save-feature-prompt-message').style.display = "none";
var selectedOption = selectMenu.selectedOptions[0];
var selectedValue = selectedOption.textContent;
pElement.textContent = selectedValue + " Settings - Changes detected.";
pElement2.innerHTML = selectedValue + " Settings -" + "<br>" + " Saved!";
});