diff options
author | 2022-02-24 18:00:17 +0000 | |
---|---|---|
committer | 2022-02-24 18:00:17 +0000 | |
commit | 6692bd983009078dcccdaee3b7de8fa9d79ab19f (patch) | |
tree | a3ff354b4183ff66632528b03b0358a57127b4b7 /_static/changelog.js | |
parent | Deploying to docs from @ python-discord/bot-core@72ec57ae3153a274c902493ef6f7... (diff) |
Deploying to docs from @ python-discord/bot-core@554919b6314814320f35431a6cfb32ca81b09079 🚀
Diffstat (limited to '_static/changelog.js')
-rw-r--r-- | _static/changelog.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/_static/changelog.js b/_static/changelog.js deleted file mode 100644 index f72d025c..00000000 --- a/_static/changelog.js +++ /dev/null @@ -1,37 +0,0 @@ -/** Update the changelog colors in dark mode */ - -const changelog = document.getElementById("changelog"); - -function updateEntryColor(entry) { - const line = entry.lastChild; - const lightColorSpan = line.childNodes.item(1); - const darkColorSpan = lightColorSpan.cloneNode(true); - - line.insertBefore(darkColorSpan, lightColorSpan); - - lightColorSpan.classList.add("light"); - darkColorSpan.classList.add("dark"); - - let color; - switch (darkColorSpan.textContent) { - case "Feature": - color = "#5BF38E"; - break; - case "Support": - color = "#55A5E7"; - break; - case "Bug": - color = "#E14F4F"; - break; - default: - color = null; - } - - darkColorSpan.style["color"] = color; -} - -if (changelog !== null) { - for (let collection of changelog.getElementsByClassName("simple")) { - Array.from(collection.children).forEach(updateEntryColor); - } -} |