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

Commit

Permalink
Small fixes (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabious authored May 26, 2021
1 parent c36af21 commit d7be6bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion background_scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
});

setStatusOnLocation(data.url, STATUS.SUCCESS);
addLocationActivity(data.location, "Succes - Créneau trouvé");
addLocationActivity(data.location, "Succès - Créneau trouvé");
break;

case "booked":
Expand Down
2 changes: 1 addition & 1 deletion browser_action/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ label a {

#debugActivity {
list-style: none;
max-height: 70px;
max-height: 100px;
overflow: auto;
padding: 0;
}
Expand Down
8 changes: 4 additions & 4 deletions content_scripts/doctolib/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
return $el;
}

async function selectOption($select, $option) {
function selectOption($select, $option) {
const evt = document.createEvent("HTMLEvents");
evt.initEvent("change", true, true);

Expand Down Expand Up @@ -112,7 +112,7 @@
);
}

async function getAvailableSlot() {
function getAvailableSlot() {
return waitForSelector(
".availabilities-slot:not([disabled])",
".booking-availabilities .booking-message.booking-message-warning"
Expand Down Expand Up @@ -352,7 +352,7 @@
// Confirmation finale
document.querySelector('button[type="submit"]').click();

await new Promise((r) => setTimeout(r, 3000));
await waitTimeout(3000);

await browser.runtime.sendMessage({
type: "booked",
Expand Down Expand Up @@ -389,7 +389,7 @@
}
}

browser.storage.onChanged.addListener(async (change, areaName) => {
browser.storage.onChanged.addListener((change, areaName) => {
if (
areaName === "sync" &&
change.stopped &&
Expand Down
4 changes: 2 additions & 2 deletions content_scripts/doctolib/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
$btn.onclick = async function (e) {
e.preventDefault();

toggleLocation.bind(this, locations)();
toggleLocation.call(this, locations);
};

const $div = document.createElement("div");
Expand Down Expand Up @@ -90,7 +90,7 @@

addButtons(locations);

browser.storage.onChanged.addListener(async (change, areaName) => {
browser.storage.onChanged.addListener((change, areaName) => {
if (areaName !== "sync" || !change.locations) return;

addButtons(change.locations.newValue || {});
Expand Down

0 comments on commit d7be6bb

Please sign in to comment.