Skip to content

Commit

Permalink
fix: open full text links normally
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgw committed Mar 10, 2024
1 parent 0aba30c commit b211050
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,10 @@

const $result = document.createElement('div')
$result.setAttribute('class', 'result')
$result.addEventListener('click', () => {
window.open(`/catalog/detail?id=${result.id}`, '_blank').focus()
$result.addEventListener('click', event => {
if (event.target.tagName !== 'A') {
window.open(`/catalog/detail?id=${result.id}`, '_blank').focus()
}
})

// COLUMN 1
Expand Down Expand Up @@ -566,7 +568,7 @@
$fulltext.innerHTML = octicons.available

const $fulltextLink = document.createElement('a')
$fulltextLink.setAttribute('target', 'blank')
$fulltextLink.setAttribute('target', '_blank')
$fulltextLink.setAttribute('href', fulltext)
$fulltextLink.textContent = fulltext
$fulltext.append(' ', $fulltextLink)
Expand Down

0 comments on commit b211050

Please sign in to comment.