Skip to content

Commit 519c0bc

Browse files
authored
知乎修改了高亮链接地址,脚本进行了相应修改
1 parent 7f3590f commit 519c0bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Zhihu-Enhanced.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ function removeHighlightLink() {
10331033
for (const mutation of mutationsList) {
10341034
for (const target of mutation.addedNodes) {
10351035
if (target.nodeType != 1 || target.tagName != 'A') break
1036-
if (target.dataset.zaNotTrackLink && target.href.indexOf('https://www.zhihu.com/search?q=') > -1) {
1036+
if (target.dataset.zaNotTrackLink && target.href.indexOf('https://zhida.zhihu.com/search?q=') > -1) {
10371037
target.parentElement.replaceWith(target.textContent);
10381038
}
10391039
}
@@ -1043,7 +1043,7 @@ function removeHighlightLink() {
10431043
observer.observe(document, { childList: true, subtree: true });
10441044

10451045
// 针对的是打开网页后直接加载的前面几个回答(上面哪些是针对动态加载的回答)
1046-
document.querySelectorAll('span > a[data-za-not-track-link][href^="https://www.zhihu.com/search?q="]').forEach(e => e.parentElement.replaceWith(e.textContent))
1046+
document.querySelectorAll('span > a[data-za-not-track-link][href^="https://zhida.zhihu.com/search?q="]').forEach(e => e.parentElement.replaceWith(e.textContent))
10471047
}
10481048

10491049

0 commit comments

Comments
 (0)