(linkElement)
| 388 | |
| 389 | // used by the findAndFollow* functions. |
| 390 | const followLink = function (linkElement) { |
| 391 | if (linkElement.nodeName.toLowerCase() === "link") { |
| 392 | globalThis.location.href = linkElement.href; |
| 393 | } else { |
| 394 | // if we can click on it, don't simply set location.href: some next/prev links are meant to |
| 395 | // trigger AJAX calls, like the 'more' button on GitHub's newsfeed. |
| 396 | linkElement.scrollIntoView(); |
| 397 | DomUtils.simulateClick(linkElement); |
| 398 | } |
| 399 | }; |
| 400 | |
| 401 | // Find links which have text matching any one of `linkStrings`. If there are multiple candidates, |
| 402 | // they are prioritized for shortness, by their position in `linkStrings`, how far down the page |
no test coverage detected