diff options
| author | ache <ache@ache.one> | 2026-06-20 08:18:30 +0200 |
|---|---|---|
| committer | ache <ache@ache.one> | 2026-06-20 08:18:30 +0200 |
| commit | 5d84179c555d08e5349637e99b56ff9550c2f852 (patch) | |
| tree | e154df6f4bf4f056809bb41d500bdf57e57f9c31 /src/js | |
| parent | Retrait du support d'avif (diff) | |
Diffstat (limited to 'src/js')
| -rw-r--r-- | src/js/theme.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/js/theme.js b/src/js/theme.js index 23d3a67..c95bd8f 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -13,6 +13,8 @@ window.addEventListener("DOMContentLoaded", () => { const footnotes = document.querySelector(".footnotes"); const harr = document.querySelector("#harr"); let links = document.querySelectorAll("a"); + const specialBox = document.querySelectorAll(".special-box"); + const details = document.querySelectorAll("details"); const likes = document.querySelectorAll(".likes"); const tables = document.querySelectorAll("table"); const codes = document.querySelectorAll("p code"); @@ -34,6 +36,13 @@ window.addEventListener("DOMContentLoaded", () => { for (const link of links) { link.classList.add(theme); } + for (const box of specialBox) { + box.classList.add(theme); + } + for (const box of details) { + box.classList.add(theme); + } + for (const likeBox of likes) { likeBox.classList.add(theme); } @@ -107,6 +116,17 @@ window.addEventListener("DOMContentLoaded", () => { link.classList.add(theme); } } + for (const box of specialBox) { + if (!box.classList.replace(...arg)) { + box.classList.add(theme); + } + } + for (const box of details) { + if (!box.classList.replace(...arg)) { + box.classList.add(theme); + } + } + for (const table of tables) { if (!table.classList.replace(...arg)) { table.classList.add(theme); |