Had my comments backwards, simplify selector

This commit is contained in:
Dannon Baker
2021-09-02 08:52:06 -04:00
parent 33c64034dc
commit 5c78a79123
+4 -4
View File
@@ -8,16 +8,16 @@ function showNewsOverlay() {
}
function newsSeen() {
// When it's seen, remove fa and far, add fas.
const newsIconSpan = document.getElementById("news").querySelector(".fa-bell");
// When it's seen, remove fa, add far.
const newsIconSpan = document.querySelector("#news .fa-bell");
newsIconSpan.classList.remove("fa");
newsIconSpan.classList.add("far");
window.localStorage.setItem("galaxy-news-seen-release", Galaxy.config.version_major);
}
function newsUnseen() {
// When there is news, set far instead of fa
const newsIconSpan = document.getElementById("news").querySelector(".fa-bell");
// When there is news, remove far, add fa for (default -- same as fas) solid style.
const newsIconSpan = document.querySelector("#news .fa-bell");
newsIconSpan.classList.remove("far");
newsIconSpan.classList.add("fa");
}