MCPcopy Create free account
hub / github.com/dailydotdev/apps / pageTop

Function pageTop

packages/shared/src/components/shell/ReadingDrawer.tsx:326–329  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324 const page =
325 document.querySelector<HTMLElement>('.shell-layout') ?? document.body;
326 const pageTop = () =>
327 page.getBoundingClientRect().top +
328 window.scrollY +
329 parseFloat(getComputedStyle(page).paddingTop);
330 const before = pageTop();
331 root.classList.add('reading');
332 // Both heights are layouts at the top of the document: the card has

Callers 1

ReadingDrawerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected