mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 14:34:19 +01:00
removed uneeded logic on docs-viewer click listener
This commit is contained in:
@@ -65,11 +65,6 @@ customElements.define('docs-viewer', class extends HTMLElement {
|
||||
this.panel.addEventListener('click', async (evt) => {
|
||||
evt.preventDefault()
|
||||
if (evt.target?.tagName !== 'A') return
|
||||
const targetUrl = new URL(evt.target.href)
|
||||
if (targetUrl.hash === '#documentation') {
|
||||
await this.load('/readme.md')
|
||||
return
|
||||
}
|
||||
const href = evt.target.href
|
||||
const { origin } = new URL(location.href)
|
||||
const url = new URL(href, location.href)
|
||||
|
||||
Reference in New Issue
Block a user