mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Start at index 3, because the frontend starts two nodes above the backend
This commit is contained in:
parent
744c01df49
commit
c42996721a
1 changed files with 3 additions and 3 deletions
|
|
@ -105,9 +105,9 @@ function parseDomTree(pageNode: Element) {
|
|||
|
||||
visitedNodeList.shift()
|
||||
visitedNodeList.forEach((node, index) => {
|
||||
// We start at index 2, because the frontend starts one node above us
|
||||
// on the #readability-content element that wraps the entire content.
|
||||
node.setAttribute('data-omnivore-anchor-idx', (index + 2).toString())
|
||||
// We start at index 3, because the frontend starts two nodes above us
|
||||
// on the #readability-page-1 element that wraps the entire content.
|
||||
node.setAttribute('data-omnivore-anchor-idx', (index + 3).toString())
|
||||
})
|
||||
return visitedNodeList
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue