From 44e6bcb93a6d29870d553beb0bd6e3885637f222 Mon Sep 17 00:00:00 2001 From: Michal Date: Wed, 15 Aug 2018 12:14:06 +0200 Subject: [PATCH] Replace "fuck" with "ajax_failure" It makes the reason of the data structure clearer :-) --- templates/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/main.js b/templates/main.js index b55fbb5..7160868 100644 --- a/templates/main.js +++ b/templates/main.js @@ -74,7 +74,7 @@ function hiddenUpdateRemote(json) { addCoffee(flavor); } break; - case "fuck": + case "ajax_failure": ajax(msg.method, msg.route, msg.data, msg.id); break; } @@ -115,15 +115,15 @@ function ajax(method, route, data, id) { updateUI(); if (localStorage) { - var fuck = JSON.stringify({ - type: "fuck", + var ajax_failure = JSON.stringify({ + type: "ajax_failure", method: method, route: route, data: data, id: id }); let queue = JSON.parse(localStorage.getItem("offlineQueue")) || []; - queue.push({ time: Date.now(), data: fuck }); + queue.push({ time: Date.now(), data: ajax_failure }); try { localStorage.setItem("offlineQueue", JSON.stringify(queue)); } -- 2.39.2