Skip to content

Commit

Permalink
add undo and confirm commands for daily chess
Browse files Browse the repository at this point in the history
  • Loading branch information
leandwo authored and everyonesdesign committed Feb 2, 2025
1 parent 6f662c2 commit 25d4b2f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ export const commands : Record<string, () => void> = {
const drawButton = <Nullable<HTMLButtonElement>>document.querySelector('.draw-button-component');
drawButton && drawButton.click();
},
cancel: () => {
const cancelButton = <Nullable<HTMLButtonElement>>document.querySelector('.daily-confirm-move-buttons .cc-button-secondary')
cancelButton && cancelButton.click()
},
confirm: () => {
const confirmButton = <Nullable<HTMLButtonElement>>document.querySelector('.daily-confirm-move-buttons .cc-button-primary')
confirmButton && confirmButton.click()
}
};

/**
Expand Down

0 comments on commit 25d4b2f

Please sign in to comment.