From e1349d418ce4bd5957f8fe657c2ce80d2b502b81 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sun, 27 Aug 2017 19:35:08 +0100 Subject: views: In the summary, make the sections toggable As an experiment, make the sections of the summary to be toggable. This can help readability, although it's unclear if it's worth the additional complexity and could be removed later. --- static/git-arr.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'static/git-arr.js') diff --git a/static/git-arr.js b/static/git-arr.js index d1e3b81..d39ca72 100644 --- a/static/git-arr.js +++ b/static/git-arr.js @@ -61,3 +61,13 @@ function replace_timestamps() { } } } + +function toggle(id) { + var e = document.getElementById(id); + + if (e.style.display == "") { + e.style.display = "none" + } else if (e.style.display == "none") { + e.style.display = "" + } +} -- cgit v1.2.3