Skip to content

Commit

Permalink
scroll button to center
Browse files Browse the repository at this point in the history
  • Loading branch information
mortonfox committed Feb 1, 2025
1 parent 278aef1 commit b03f12e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function runSelect(event) {
let btns = findButtons('Show More');
if (!btns.length) break;
let btn = btns[0];
btn.scrollIntoView();
btn.scrollIntoView({ block: 'center' });
btn.click();
await sleep(1000);
}
Expand All @@ -34,7 +34,7 @@ async function runSelect(event) {

let clicked = 0;
for (let btn of Array.from(btns).reverse()) {
btn.scrollIntoView();
btn.scrollIntoView({ block: 'center' });
btn.click();
clicked++;
await sleep(1000);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Food Lion - Load All To Card",
"version": "0.0.6",
"version": "0.0.7",

"description": "Load all MVP coupons to card",

Expand Down

0 comments on commit b03f12e

Please sign in to comment.