[23] Version check (#2142)

pull/2143/head
YozoraXCII 5 months ago committed by GitHub Action
parent c43d7830e8
commit 279159c688

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

@ -1,18 +1,15 @@
function checkURLForBranch() { document.addEventListener("DOMContentLoaded", () => {
const currentURL = window.location.href; const currentURL = window.location.href;
const ellipsisSpan = document.querySelector(".md-ellipsis"); 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 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"; 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) { if (!ellipsisSpan) {
ellipsisSpan = document.createElement("span"); ellipsisSpan = document.createElement("span");
ellipsisSpan.classList.add("md-ellipsis"); ellipsisSpan.classList.add("md-ellipsis");
@ -21,10 +18,7 @@ function checkURLForBranch() {
ellipsisSpan.textContent = ellipsisText; ellipsisSpan.textContent = ellipsisText;
// Update banner color
if (mdBanner) { if (mdBanner) {
mdBanner.style.backgroundColor = bannerColor; mdBanner.style.setProperty('background-color', bannerColor, 'important');
} }
} });
window.addEventListener("load", checkURLForBranch);

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

Loading…
Cancel
Save