From ab927e39d0484f505ab8866068bc81939f7f79d8 Mon Sep 17 00:00:00 2001 From: Srijan Choudhary Date: Sat, 3 May 2014 01:15:19 +0530 Subject: [PATCH] Add a reveal on click parameter --- isso/js/app/config.js | 1 + isso/js/app/isso.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/isso/js/app/config.js b/isso/js/app/config.js index d9fa133..ab700a5 100644 --- a/isso/js/app/config.js +++ b/isso/js/app/config.js @@ -7,6 +7,7 @@ define(function() { "reply-to-self": false, "max-comments-top": 20, "max-comments-nested": 5, + "reveal-on-click": "5", "avatar-bg": "#f0f0f0", "avatar-fg": ["#9abf88", "#5698c4", "#e279a3", "#9163b6", "#be5168", "#f19670", "#e4bf80", "#447c69"].join(" ") diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index 3cc780a..24e2779 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -100,9 +100,9 @@ define(["app/text/html", "app/dom", "app/utils", "app/config", "app/api", "app/m $("a.load_hidden", el).toggle("click", function() { el.remove(); - api.fetch($("#isso-thread").getAttribute("data-isso-id"), - limit = config["max-comments-top"], nested_limit=0, - parent=commentWrapper.id, + api.fetch($("#isso-thread").getAttribute("data-isso-id"), + limit = config["reveal-on-click"], nested_limit="0", + parent=commentWrapper.id, lastcreated=lastcreated).then( function(rv) { if (rv.total_replies == 0) {