Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
remove obselete double check for pfizer/moderna as the user can choos…
Browse files Browse the repository at this point in the history
…e now which one to use
  • Loading branch information
hschaeidt committed Dec 10, 2021
1 parent 32c8518 commit 23bb64e
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions content_scripts/doctolib/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,24 +372,13 @@
wait
);
if ($bookingMotive) {
let optionFound = false;
for (const $option of $bookingMotive.querySelectorAll("option")) {
// On ne s'occupe que de Pfizer et Moderna
// Pour le reste pas besoin de l'extension, de nombreux RDV sont disponibles
if (
!isARNmMotive($option.textContent, injectionType, injectionVaccine)
)
continue;

selectOption($bookingMotive, $option);
optionFound = true;

// Il peut y avoir des places pour Moderna mais pas pour Pfizer, ou inversement, il faut tester les deux
slot = await getAvailableSlot();
if (slot !== null) break;
}
const arnMotive = selectOptionInSelect(
$bookingMotive,
testIsARNmMotive(injectionType, injectionVaccine)
);

if (!optionFound) throw new Error("Injection ARNm non disponible 1");
if (!arnMotive.optionFound)
throw new Error("Injection ARNm non disponible 1");
} else {
// On a peut-être directement la boite "pas de créneaux possibles"
// Cas où il n'y a qu'un choix
Expand Down

0 comments on commit 23bb64e

Please sign in to comment.