Merge pull request #53 from sgvictorino/prevent-duplicate-annotation-cards
fix: don't create duplicate annotation elements
This commit is contained in:
commit
aac426d27e
@ -41,10 +41,12 @@ function getAnnotation(e) {
|
||||
annotationDiv.innerHTML = parsedReponse.html
|
||||
annotationDiv.id = uri
|
||||
annotationDiv.className = "annotation"
|
||||
if (!document.getElementById(uri)) {
|
||||
e.target.parentElement.insertAdjacentElement('afterend', annotationDiv)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window._currentTheme = localStorage.getItem("_theme") || "light"
|
||||
setTheme(window._currentTheme)
|
||||
|
Loading…
x
Reference in New Issue
Block a user