Skip to content

Instantly share code, notes, and snippets.

@arturo182
Last active November 8, 2021 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arturo182/df908d1c7952f4186c3653d9462cb22f to your computer and use it in GitHub Desktop.
Save arturo182/df908d1c7952f4186c3653d9462cb22f to your computer and use it in GitHub Desktop.
tbody = document.querySelectorAll(".table-area tbody")[0];
i = tbody.children.length;
while (i--) {
child = tbody.children[i];
qty = child.children[3].firstChild.innerText.split('\n')[0];
//console.log(qty);
qtyint = parseInt(qty);
// Change 3000 here to preferred qty
if ((qtyint < 3000) || (qty == "Discontinued"))
tbody.removeChild(child);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment