This commit is contained in:
Isaac Shoebottom 2023-11-21 15:09:07 -04:00
parent 0a79a40a64
commit 204eb0d6f6

View File

@ -88,8 +88,6 @@ function swapCards(cards): void {
let album = elements.item(2) let album = elements.item(2)
card.insertBefore(album, artist) card.insertBefore(album, artist)
log("Swapped artist: " + artist.innerText + " and album: " + album.innerText)
// Album has isSecondary // Album has isSecondary
let secondaryClass = album.className.split(" ").find((className) => className.includes("isSecondary")) let secondaryClass = album.className.split(" ").find((className) => className.includes("isSecondary"))
@ -101,6 +99,8 @@ function swapCards(cards): void {
// Add a swap property to the card, so we can check if it's already been swapped // Add a swap property to the card, so we can check if it's already been swapped
card.attributes.swap = true card.attributes.swap = true
logSwap(artist.innerText, album.innerText)
} }
} }
@ -145,7 +145,6 @@ function albumPage() {
} }
container.insertBefore(album, artist) container.insertBefore(album, artist)
log("Swapped artist: " + artist.innerText + " and album: " + album.innerText)
let newArtist = document.createElement("h2") let newArtist = document.createElement("h2")
let newAlbum = document.createElement("h1") let newAlbum = document.createElement("h1")
@ -166,6 +165,8 @@ function albumPage() {
// Add a swap property to the container, so we can check if it's already been swapped // Add a swap property to the container, so we can check if it's already been swapped
container.attributes.swap = true container.attributes.swap = true
logSwap(artist.innerHTML, album.innerHTML)
} }
function alwaysCheck() { function alwaysCheck() {