Update app.js

This commit is contained in:
Justin 2022-06-10 18:05:10 +08:00 committed by GitHub
parent 16ffda9c3f
commit 7ff2b90116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1580,3 +1580,18 @@ window.onload = () => {
changeVarValue(); changeVarValue();
addEventOnFeaturesList(); addEventOnFeaturesList();
}; };
// Update button CSS effects if update available vs if already up to date
var btnText = document.getElementById("update-btn").innerText
var divClass = document.getElementById("outer-div")
if(btnText == "Up to date"){
divClass.classList.remove("main-div2");
divClass.classList.add("main-div3");
}else{
divClass.classList.remove("main-div3");
divClass.classList.add("main-div2");
}