Fix links cannot open (#3191)

This commit is contained in:
the1812 2022-05-25 21:42:43 +08:00
parent 0481df44dc
commit 9e93313b6c
2 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
[data-module="desc"],
[data-module="desc"][data-orig],
.card[data-did] .content {
cursor: text;
.details {
@ -13,3 +13,8 @@
}
}
}
.bili-rich-text-module {
&.at {
cursor: pointer;
}
}

View File

@ -27,6 +27,14 @@ const entry = async () => {
if (target.hasAttribute('click-title')) {
return
}
console.log({ target })
if ([
'bili-rich-text-topic',
'bili-rich-text-module',
'bili-rich-text-link',
].some(className => target.classList.contains(className))) {
return
}
const popups = dqa(element, '.im-popup')
if (popups.some(p => p.contains(target))) {
return