refactor code
This commit is contained in:
@@ -14,7 +14,11 @@ updateBackground();
|
||||
function updateBackground() {
|
||||
isWarranty.nextElementSibling.style.backgroundColor = isWarranty.checked
|
||||
? "red"
|
||||
: "transparent";
|
||||
: "transparent";
|
||||
isWarranty.nextElementSibling.style.color = isWarranty.checked
|
||||
? "white"
|
||||
: "black";
|
||||
}
|
||||
}
|
||||
|
||||
// Notification system
|
||||
@@ -23,9 +27,3 @@ function updateBackground() {
|
||||
const notifCountStr = document.getElementById("lblTask").innerText;
|
||||
const notifCount = parseInt(notifCountStr.split(" ")[2]); // Total task count
|
||||
const notifCountNew = parseInt(notifCountStr.split(" ")[5].slice(1)); // New task count
|
||||
|
||||
/*
|
||||
// Insert notification button
|
||||
const insertButton = document.getElementById("exitBtn");
|
||||
insertButton.innerHTML = `<div id='newBtn'><a href='#' id='notification-button'><span class='material-icons-outlined notification-icon'>notifications</span></a><span id='notification-badge'>${notifCountNew}</span></div>`;
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user