aboutsummaryrefslogtreecommitdiff
path: root/tags.html
diff options
context:
space:
mode:
Diffstat (limited to 'tags.html')
-rw-r--r--tags.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/tags.html b/tags.html
index 88a04f0..84a24b0 100644
--- a/tags.html
+++ b/tags.html
@@ -6,6 +6,19 @@ toc: false
post: false
---
+<div class="dispjs">
+ <button onclick="toggle_open(this)" type="button">open all</button>
+</div>
+<script defer>
+ function toggle_open(btn) {
+ const open = btn.hasAttribute("open");
+ btn[open ? "removeAttribute" : "setAttribute"]("open", "");
+ for (let el of document.getElementsByTagName("details")) {
+ el[open ? "removeAttribute" : "setAttribute"]("open", "");
+ }
+ btn.innerText = `${open ? "open" : "close"} all`;
+ }
+</script>
<ul>
{% assign tags = site.data.tags %}
{% for tag in tags %}