aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-12-25 16:10:20 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-12-25 16:10:20 +0100
commit8f03b370cc79f275e92b04ca6f25ef2b13fa867f (patch)
tree47b57575041a66b53443a332c71db5738af663c0 /p
parent6fa09318ce4d510535c7c13723502b9917a78e85 (diff)
Send item queue as POST
Which also simplifies the request
Diffstat (limited to 'p')
-rw-r--r--p/scripts/main.js8
1 files changed, 2 insertions, 6 deletions
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--) {