Refresh home page if number of notes changes

This commit is contained in:
Skylar Ittner 2018-11-25 19:01:09 -07:00
parent 6de5a44a1f
commit b1248c80d8

View File

@ -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']);