diff options
Diffstat (limited to 'static')
| -rw-r--r-- | static/script.js | 20 | ||||
| -rw-r--r-- | static/style.css | 11 |
2 files changed, 7 insertions, 24 deletions
diff --git a/static/script.js b/static/script.js index 8137b45..c6fd3b4 100644 --- a/static/script.js +++ b/static/script.js @@ -77,28 +77,8 @@ addEventListener("DOMContentLoaded", function () { // Iterate over all pasted files. uploadFiles(e.clipboardData.files) }); - - - - /* EXPANDER */ - document.querySelectorAll('.expander-toggle').forEach((e) => { - e.addEventListener('click', toggle_expand); - }); }); -function toggle_expand(ev) { - const cl = this.parentNode.querySelector('.expander').classList; - const icon = this.parentNode.querySelector('.expander-icon'); - if (cl.contains('expander-hidden')) { - cl.replace('expander-hidden', 'expander-shown'); - icon.innerHTML = "▼"; - } else { - cl.remove('expander-shown'); - cl.add('expander-hidden'); - icon.innerHTML = "►"; - } -} - function FileUpload(preview, file) { this.ctrl = createThrobber(preview); const xhr = new XMLHttpRequest(); diff --git a/static/style.css b/static/style.css index b2584d7..0afbc61 100644 --- a/static/style.css +++ b/static/style.css @@ -47,9 +47,12 @@ body { border: 1px solid black; } -.expander-hidden { - display: none; -} -.expander-toggle { +details summary { cursor: pointer; } +details summary::marker { + content: '\25BA'; +} +details[open] summary::marker { + content: '\25BC'; +} |
