mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-15 15:09:25 +00:00
卡片URL调整
This commit is contained in:
@@ -58,15 +58,14 @@ const NotionPage = ({ post }) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 相册中的url替换成可点击
|
||||
const cards = document.getElementsByClassName('notion-collection-card')
|
||||
for (const e of cards) {
|
||||
e.removeAttribute('href')
|
||||
const links = e.querySelectorAll('.notion-link')
|
||||
if (links && links.length > 0) {
|
||||
for (const l of links) {
|
||||
l.onclick = function() {
|
||||
window.open('http://' + l.innerText)
|
||||
}
|
||||
l.parentElement.innerHTML = `<a href='${l.innerText}' rel='noreferrer' target='_blank'>${l.innerText}</a>`
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +73,7 @@ const NotionPage = ({ post }) => {
|
||||
}, 800)
|
||||
|
||||
addWatch4Dom()
|
||||
})
|
||||
}, [])
|
||||
|
||||
return <div id='container' className='max-w-4xl mx-auto'>
|
||||
<NotionRenderer
|
||||
|
||||
Reference in New Issue
Block a user