From 7370e477352cda2ca6b35c4ce19d04ff4639f849 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 1 Jan 2023 17:35:59 +0200 Subject: [PATCH] actually fix viewmore --- files/assets/js/view_more.js | 4 ++-- files/templates/comments.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/assets/js/view_more.js b/files/assets/js/view_more.js index af2e052d93..e7fca62c26 100644 --- a/files/assets/js/view_more.js +++ b/files/assets/js/view_more.js @@ -1,10 +1,10 @@ -function view_more(pid,sort,offset,ids) { +function view_more(t, pid, sort, offset) { btn = document.getElementById("viewbtn"); btn.disabled = true; btn.innerHTML = "Requesting..."; const form = new FormData(); const xhr = new XMLHttpRequest(); - ids = ids.toString().replace(/[\[\]]/g, '') + ids = t.dataset.ids.toString().replace(/[\[\] ]/g, '') xhr.open("get", `/view_more/${pid}/${sort}/${offset}?ids=${ids}`); xhr.setRequestHeader('xhr', 'xhr'); xhr.onload=function(){ diff --git a/files/templates/comments.html b/files/templates/comments.html index 90d6106d34..71e8de32e4 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -767,7 +767,7 @@ {% if offset %}
-
+
{% endif %}