Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Response filter: if two items, click the first.
  • Loading branch information
hemiola314 committed May 30, 2022
1 parent 6f57fd9 commit f5fc6ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion expand-all.js
Expand Up @@ -1196,10 +1196,12 @@ function setFilterNew2(link) {
if (filter.length == 1) {
const menus = filter[0].querySelectorAll("[role=\"menuitem\"]");

// click either the last item or third item
// click either the third item (if >3 items), first item (if 2 items), or (default) last item
let i = menus.length - 1;
if (i > 2) {
i = 2;
} else if (i == 1) {
i = 0;
}

const span = menus[i].querySelector("span");
Expand Down

0 comments on commit f5fc6ce

Please sign in to comment.