You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Plex-Meta-Manager/docs/stylesheets/branch.js

25 lines
790 B

document.addEventListener("DOMContentLoaded", () => {
const currentURL = window.location.href;
const ellipsisSpan = document.querySelector(".md-ellipsis");
const mdBanner = document.querySelector(".md-banner");
let ellipsisText = "Kometa Wiki";
if (currentURL.includes("en/nightly") || currentURL.includes("en/develop")) {
ellipsisText = currentURL.includes("en/nightly") ? "Kometa Nightly Wiki" : "Kometa Develop Wiki";
bannerColor = "#611423";
}
if (!ellipsisSpan) {
ellipsisSpan = document.createElement("span");
ellipsisSpan.classList.add("md-ellipsis");
document.body.appendChild(ellipsisSpan);
}
ellipsisSpan.textContent = ellipsisText;
if (mdBanner) {
mdBanner.style.setProperty('background-color', bannerColor, 'important');
}
});