aboutsummaryrefslogtreecommitdiff
path: root/http/src/js
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-09-15 09:52:10 +0100
committerJoe Carstairs <me@joeac.net>2026-09-15 09:52:10 +0100
commit78584b367a509bdebce3a103c475b969b959347f (patch)
tree6a1c8b1485b41f4c42266c2d5811b4734dd43fb6 /http/src/js
parent7649503911c3a2b390c304563dabd87fa643759b (diff)
move script to public/
Diffstat (limited to 'http/src/js')
-rw-r--r--http/src/js/feed-condense-content.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/http/src/js/feed-condense-content.js b/http/src/js/feed-condense-content.js
deleted file mode 100644
index 02361b5..0000000
--- a/http/src/js/feed-condense-content.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const expandedClass = "e-content--expanded";
-
-function toggleContentExpanded(id) {
- const content = document.querySelector(`[data-content-id=${id}`);
- if (!content) {
- throw new Error(`No content found with ID: ${id}`);
- }
- const classes = content.getAttribute("class").split(" ");
- if (classes.includes(expandedClass)) {
- const newClasses = classes.filter((c) => c != expandedClass);
- content.setAttribute("class", newClasses.join(" "));
- } else {
- content.setAttribute("class", [...classes, expandedClass].join(" "));
- }
-}
-
-function addExpandItemButtons() {
- for (const content of document.querySelectorAll(".e-content")) {
- const contentId = crypto.randomUUID();
- content.setAttribute("data-content-id", contentId);
- const button = new HTMLButtonElement();
- button.onclick = `toggleContentExpanded(${contentId})`;
- content.insertAdjacentElement("afterend", button);
- }
-}