From 7ff2b901161c370531aacd63d6506dffd837e5bf Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 10 Jun 2022 18:05:10 +0800 Subject: [PATCH] Update app.js --- static/app.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/static/app.js b/static/app.js index 2fe1e7a..642f005 100755 --- a/static/app.js +++ b/static/app.js @@ -1580,3 +1580,18 @@ window.onload = () => { changeVarValue(); 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"); + +}