Skip to content

Instantly share code, notes, and snippets.

@enVolt
Last active June 5, 2023 10:02
Show Gist options
  • Save enVolt/9e4d845c8858268dad62349f5b89ca36 to your computer and use it in GitHub Desktop.
Save enVolt/9e4d845c8858268dad62349f5b89ca36 to your computer and use it in GitHub Desktop.
find_slot = function () {
acc = document.getElementById("appointment_accordion")
acc.childElements().forEach(el => {
slots_parent = el.childElements()[1].childElements()[0].childElements()[0]
slots_parent.childElements().forEach(day_slot => {
date = day_slot.getElementsByClassName("appt-table-d")[0].innerHTML.replace("<br>", ",")
slots = day_slot.getElementsByTagName("a");
for (i = 0; i < slots.length; i++) {
slot = slots[i];
index = slot.getAttribute("class").indexOf("full")
if (index == -1) {
console.log("found on "+ date + ", for time - " + slot.innerHTML);
} else {
// console.log("not-found on "+ date + ", for time - " + slot.innerHTML)
}
}
})
})
}
find_slot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment