summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/theme.js20
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);