diff --git a/src/views/watch.ecr b/src/views/watch.ecr index e70e4029..461627be 100644 --- a/src/views/watch.ecr +++ b/src/views/watch.ecr @@ -71,7 +71,18 @@ function toggle(target) { target.innerHTML = '[ - ]'; body.style.display = ''; } +}; + +function toggle_comments(target) { + body = target.parentNode.parentNode.parentNode.children[1]; + if (body.style.display === null || body.style.display === '') { + target.innerHTML = '[ + ]'; + body.style.display = 'none'; + } else { + target.innerHTML = '[ - ]'; + body.style.display = ''; } +};
@@ -116,13 +127,20 @@ function toggle(target) {

<% if reddit_thread && !reddit_html.empty? %> +
-

<%= reddit_thread.data.title %>

+

+ [ - ] + <%= reddit_thread.data.title %> +

View more comments on Reddit +
+
<%= reddit_html %>
+
<% end %>