added background removal

This commit is contained in:
SethBurkart123
2023-10-20 07:09:38 +11:00
parent 7525a9041e
commit 310ff7a281
2 changed files with 67 additions and 51 deletions
+6
View File
@@ -37,6 +37,12 @@ const updateBackground = async () => {
const data = await readData();
if (!data) {
console.log("No data found in IndexedDB.");
const container = document.getElementById("media-container");
const currentMedia = container.querySelector(".current-media");
if (currentMedia) {
currentMedia.remove();
}
return;
}