From 52057b9cf1f867aba102dc08f5e954a642e602de Mon Sep 17 00:00:00 2001 From: kor Date: Sun, 28 Jan 2024 17:03:03 +0100 Subject: [PATCH] feat: Better updating of page --- public/js/collection.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/js/collection.js b/public/js/collection.js index 09f98cb..d167540 100644 --- a/public/js/collection.js +++ b/public/js/collection.js @@ -66,10 +66,15 @@ logButton.addEventListener('click', function () { }); }); +document.addEventListener('DOMContentLoaded', function () { + loadCollections(); +}); + // Clear button var clearButton = document.getElementById('clearButton'); clearButton.addEventListener('click', function () { chrome.runtime.sendMessage({ action: "clearStorage" }, function (response) { console.log("Response:", response); + loadCollections(); }); });