From b1248c80d8e4c4bd6b5cf42722bf5b475cab5a0a Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sun, 25 Nov 2018 19:01:09 -0700 Subject: [PATCH] Refresh home page if number of notes changes --- static/js/home.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/home.js b/static/js/home.js index b04691a..6aa3a46 100644 --- a/static/js/home.js +++ b/static/js/home.js @@ -9,6 +9,9 @@ setInterval(function () { $.getJSON("action.php", { action: "getnotes" }, function (notes) { + if ($(".notecard").length != notes.length) { + window.location.reload(true); + } for (var i = 0; i < notes.length; i++) { n = notes[i]; var notecard = $("#notecard_" + n['noteid']);