| 431 | |
| 432 | /** Der Twin, mit der Frage, ob seine Kante etwas sagt. */ |
| 433 | const twinEdge = (page) => |
| 434 | page.evaluate(() => { |
| 435 | const body = document.querySelector('.atlas-twin-body'); |
| 436 | const mark = document.querySelector('[data-testid="atlas-twin-more"]'); |
| 437 | if (body === null) { |
| 438 | return { present: false }; |
| 439 | } |
| 440 | const markStyle = mark === null ? null : window.getComputedStyle(mark); |
| 441 | const markBox = mark?.getBoundingClientRect(); |
| 442 | return { |
| 443 | present: true, |
| 444 | hidden: Math.round(body.scrollHeight - body.clientHeight), |
| 445 | scrollHeight: Math.round(body.scrollHeight), |
| 446 | clientHeight: Math.round(body.clientHeight), |
| 447 | empty: document.querySelector('[data-testid="atlas-twin-empty"]') !== null, |
| 448 | depth: document.querySelector('[data-testid="atlas-twin-depth-name"]')?.textContent?.trim() ?? '', |
| 449 | top: Math.round(body.scrollTop), |
| 450 | mark: mark === null ? '' : mark.getAttribute('data-scroll-hint') ?? '', |
| 451 | markText: mark?.textContent?.trim() ?? '', |
| 452 | markVisible: mark !== null && markStyle !== null && markBox !== undefined |
| 453 | && markBox.width > 0 && markBox.height > 0 |
| 454 | && markStyle.display !== 'none' && markStyle.visibility !== 'hidden', |
| 455 | }; |
| 456 | }); |
| 457 | |
| 458 | // ------------------------------------------------------------- Klickstrecke - |
| 459 | |