[23] Version check (#2142)

This commit is contained in:
YozoraXCII 2024-06-26 11:47:29 +01:00 committed by GitHub Action
parent c43d7830e8
commit 279159c688
3 changed files with 7 additions and 15 deletions

View file

@ -1 +1 @@
2.0.2-build22
2.0.2-build23

View file

@ -1,18 +1,15 @@
function checkURLForBranch() {
document.addEventListener("DOMContentLoaded", () => {
const currentURL = window.location.href;
const ellipsisSpan = document.querySelector(".md-ellipsis");
const mdBanner = document.querySelector(".md-banner"); // Select the banner element
const mdBanner = document.querySelector(".md-banner");
// Default text
let ellipsisText = "Kometa Wiki";
let bannerColor = "#252525"; // Default banner color
if (currentURL.includes("en/nightly") || currentURL.includes("en/develop") {
if (currentURL.includes("en/nightly") || currentURL.includes("en/develop")) {
ellipsisText = currentURL.includes("en/nightly") ? "Kometa Nightly Wiki" : "Kometa Develop Wiki";
bannerColor = "#611423"; // Updated banner color
bannerColor = "#611423";
}
// Create ellipsisSpan if it doesn't exist
if (!ellipsisSpan) {
ellipsisSpan = document.createElement("span");
ellipsisSpan.classList.add("md-ellipsis");
@ -21,10 +18,7 @@ function checkURLForBranch() {
ellipsisSpan.textContent = ellipsisText;
// Update banner color
if (mdBanner) {
mdBanner.style.backgroundColor = bannerColor;
mdBanner.style.setProperty('background-color', bannerColor, 'important');
}
}
window.addEventListener("load", checkURLForBranch);
});

View file

@ -35,8 +35,6 @@ table tr td code {
}
.md-banner {
background-color: #252525;
color: var(--md-footer-fg-color);
overflow: auto;
text-align: center;
}