From 8f03b370cc79f275e92b04ca6f25ef2b13fa867f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 25 Dec 2018 16:10:20 +0100 Subject: Send item queue as POST Which also simplifies the request --- p/scripts/main.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'p/scripts') diff --git a/p/scripts/main.js b/p/scripts/main.js index d6d018bda..5d5679839 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -165,17 +165,13 @@ var pending_entries = {}, mark_read_queue = []; function send_mark_read_queue(queue, asRead) { - let url = '.?c=entry&a=read' + (asRead ? '' : '&is_read=0'); - for (let i = queue.length - 1; i >= 0; i--) { - url += '&id[]=' + queue[i]; - } - $.ajax({ type: 'POST', - url: url, + url: '.?c=entry&a=read' + (asRead ? '' : '&is_read=0'), data: { ajax: true, _csrf: context.csrf, + 'id[]': queue, }, }).done(function (data) { for (let i = queue.length - 1; i >= 0; i--) { -- cgit v1.2.3