remove debug lines

This commit is contained in:
Jackson Harper
2023-03-11 08:02:46 +08:00
parent 5c69b5d8c0
commit 112df31fe4
2 changed files with 0 additions and 7 deletions

View File

@ -45,7 +45,6 @@ export function Article(props: ArticleProps): JSX.Element {
if (!articleContentRef.current) return
if (!window.document.scrollingElement) return
const anchor = getTopOmnivoreAnchorElement(articleContentRef.current)
console.log(' -- getTopOmnivoreAnchorElement: ', anchor)
const topPositionPercent =
window.scrollY / window.document.scrollingElement.scrollHeight
const anchorIndex = Number(anchor)
@ -106,7 +105,6 @@ export function Article(props: ArticleProps): JSX.Element {
return
}
console.log('props.initialAnchorIndex: ', props.initialAnchorIndex)
const anchorElement = props.highlightHref.current
? document.querySelector(
`[omnivore-highlight-id="${props.highlightHref.current}"]`

View File

@ -29,11 +29,6 @@ export const getTopOmnivoreAnchorElement = (
}
}
console.log(
' top visible rect:',
topVisibleRect?.getBoundingClientRect().top,
topVisibleRect?.getAttribute(`data-omnivore-anchor-idx`)
)
return topVisibleRect?.getAttribute(`data-omnivore-anchor-idx`) ?? undefined
}