diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-10-26 16:39:03 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-10-26 16:39:03 +0200 |
commit | 9f9d66afebc59c6c265c4424f7b8fb36d8876541 (patch) | |
tree | 8af8fc2fb1634a2f53df35544081a48956e6efad /app/listing.php | |
parent | ae187b6d75c8079da0be1dc288613bad8466fe61 (diff) | |
download | mist-9f9d66afebc59c6c265c4424f7b8fb36d8876541.tar.gz mist-9f9d66afebc59c6c265c4424f7b8fb36d8876541.tar.bz2 mist-9f9d66afebc59c6c265c4424f7b8fb36d8876541.zip |
Updated 34 files and added 146 files (automated)
Diffstat (limited to 'app/listing.php')
-rw-r--r-- | app/listing.php | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/app/listing.php b/app/listing.php index 8ea25d4..9d50178 100644 --- a/app/listing.php +++ b/app/listing.php @@ -148,30 +148,6 @@ if (!$presetList) { } <?php endif; ?> - async function favoriteSong(id) { - document.getElementById("btn-favorite-" + id + "-icon").src = "/assets/icons/favorite-on.svg"; - document.getElementById("btn-favorite-" + id).onclick = () => { - unfavoriteSong(id); - } - await fetch("/api/addFavorite.php?i=" + id); - - window.parent.redownloadFavorites(); - } - - async function unfavoriteSong(id) { - document.getElementById("btn-favorite-" + id + "-icon").src = "/assets/icons/favorite-off.svg"; - document.getElementById("btn-favorite-" + id).onclick = () => { - favoriteSong(id); - } - await fetch("/api/removeFavorite.php?i=" + id); - - <?php if (isset($favoritesList)): ?> - location.reload(); - <?php endif; ?> - - window.parent.redownloadFavorites(); - } - let items = Array.from(document.getElementsByClassName("track")).map(i => { return { title: i.getAttribute("data-item-track"), artist: i.getAttribute("data-item-artist"), id: i.id } }); const fuse = new Fuse(items, { |