mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-22 12:33:10 +00:00
24 lines
790 B
JavaScript
24 lines
790 B
JavaScript
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');
|
|
}
|
|
});
|