MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / resetScroll

Function resetScroll

graph-ui/tools/lib/readability.mjs:658–673  ·  view source on GitHub ↗
(page, exclusions = READABILITY_EXCLUSIONS)

Source from the content-addressed store, hash-verified

656 * Zustand darueber fuehrt.
657 */
658export async function resetScroll(page, exclusions = READABILITY_EXCLUSIONS) {
659 await page.evaluate((selectors) => {
660 const excluded = (node) => selectors.some((selector) => node.closest(selector) !== null);
661 for (const node of document.body.querySelectorAll('*')) {
662 if (excluded(node)) {
663 continue;
664 }
665 if (node.scrollTop !== 0) {
666 node.scrollTop = 0;
667 }
668 if (node.scrollLeft !== 0) {
669 node.scrollLeft = 0;
670 }
671 }
672 }, exclusions.map((entry) => entry.selector));
673}
674
675// ---------------------------------------------------------------- (e) Tooltips
676

Callers 15

shootAtRestFunction · 0.90
readabilityFunction · 0.90
readabilityFunction · 0.90
readabilityFunction · 0.90
shootFunction · 0.90
readabilityFunction · 0.90
readabilityFunction · 0.90
runStateFunction · 0.90
shootAtRestFunction · 0.90
readabilityFunction · 0.90
shootAtRestFunction · 0.90
readabilityFunction · 0.90

Calls 1

excludedFunction · 0.85

Tested by

no test coverage detected