Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
oyo committed Feb 23, 2023
1 parent 6d5c015 commit 49f3086
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions public/documentation/js/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,16 +436,15 @@ class Content extends Viewable {
}

replaceLink(item) {
const newItem = N('div', null, { class: 'headline', style: { height: item.height } })
const newItem = N('div', null, { class: 'headline' })
const link = this.renderLink(this.content, item.id)
item.parentElement.insertBefore(newItem, item)
item.parentElement.removeChild(item)
newItem.appendChild(item)
newItem.appendChild(link)
newItem.onmouseover = () => link.style.display = 'block'
newItem.onmouseout = () => link.style.display = 'none'
item.onclick = (e) => {
//e.preventDefault()
item.onclick = () => {
history.replaceState({}, document.getElementsByTagName('title').content, location.href.split('#')[0] + (item.id ? '#' + item.id : ''))
item.scrollIntoView()
}
Expand Down

0 comments on commit 49f3086

Please sign in to comment.