diff --git a/isso/js/app/config.js b/isso/js/app/config.js index 3ebc5c7..a2cc767 100644 --- a/isso/js/app/config.js +++ b/isso/js/app/config.js @@ -5,6 +5,7 @@ define(function() { "css": true, "lang": (navigator.language || navigator.userLanguage).split("-")[0], "reply-to-self": false, + "max-comments": 20, "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 fc0cbdf..90c28af 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -100,7 +100,7 @@ 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=20, parent=commentWrapper.id, lastcreated=lastcreated).then( + api.fetch($("#isso-thread").getAttribute("data-isso-id"), limit = config["max-comments"], parent=commentWrapper.id, lastcreated=lastcreated).then( function(rv) { if (rv.total_replies == 0) { return; diff --git a/isso/js/embed.js b/isso/js/embed.js index 44fdfb5..a840592 100644 --- a/isso/js/embed.js +++ b/isso/js/embed.js @@ -26,7 +26,7 @@ require(["app/lib/ready", "app/config", "app/api", "app/isso", "app/count", "app $("#isso-thread").append(new isso.Postbox(null)); $("#isso-thread").append('
'); - api.fetch($("#isso-thread").getAttribute("data-isso-id"), limit=20).then( + api.fetch($("#isso-thread").getAttribute("data-isso-id"), limit = config["max-comments"]).then( function(rv) { if (rv.total_replies == 0) { $("#isso-thread > h4").textContent = Mark.up("{{ i18n-no-comments }}");