summaryrefslogtreecommitdiff
path: root/app/listing.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/listing.php')
-rw-r--r--app/listing.php24
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, {