Update app.js

This commit is contained in:
Justin 2022-06-11 23:57:23 +08:00 committed by GitHub
parent a32bf63630
commit ff3a465981
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1647,3 +1647,33 @@ function showWeatherP() {
}
// Disable adding cities when no API key detected
if(document.getElementById("api-key1").value==="") {
document.getElementById('inputTextBtn6').disabled = true;
}
else if (document.getElementById("api-key1").value==="Weather API Key") {
document.getElementById('inputTextBtn6').disabled = true;
}
else {
document.getElementById('inputTextBtn6').disabled = false;
}
if(document.getElementById("api-key").value==="") {
document.getElementById('inputTextBtn7').disabled = true;
}
else if (document.getElementById("api-key").value==="Weather API Key") {
document.getElementById('inputTextBtn7').disabled = true;
}
else {
document.getElementById('inputTextBtn7').disabled = false;
}