Skip to content

Instantly share code, notes, and snippets.

@geotrev
Last active May 31, 2020 02:03
Show Gist options
  • Save geotrev/547efb7c25c014e165255689ca3effdd to your computer and use it in GitHub Desktop.
Save geotrev/547efb7c25c014e165255689ca3effdd to your computer and use it in GitHub Desktop.
Add missing cards to collection
;(() => {
const productRows = document.querySelectorAll('tr[id^="StoreProductId_"]')
productRows.forEach((row) => {
const quantity = row.querySelector(".CollectionText").innerText
const value = row.querySelector('.minPrice').innerText
if (parseInt(quantity) > 0 || value === "$0.00") return
row.querySelector(".CollectionUpArrow").click()
})
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment