diff --git a/js/loadBookmarks.js b/js/loadBookmarks.js index 3262a55..0efefcb 100644 --- a/js/loadBookmarks.js +++ b/js/loadBookmarks.js @@ -9,24 +9,30 @@ function loadBookmarks() { openDBRequest.onsuccess = function (openEvt) { db = openEvt.target.result; - db.transaction("Groups", "readonly").objectStore("Groups").getAll().onsuccess = function (groupsEvt) { - var groups = groupsEvt.target.result; - groups.sort(function (a, b) { - return a.groupIndex - b.groupIndex; - }); + var groupsStore = db.transaction("Groups", "readonly").objectStore("Groups"); + groupsStore.count().onsuccess = function (countEvt) { + var numGroups = countEvt.target.result; - // use a placholder to prevent problems with sortable + // use a placeholder to prevent problems with sortable var cardList = $("#cardList"); - for (let groupData of groups) { - var placeholder = $("