Skip to content

Commit 66b8035

Browse files
Update custom.js
1 parent e631a64 commit 66b8035

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: static/js/custom.js

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ window.onload = function () {
99
}
1010
}, 1000)
1111

12+
// 遍历每个 <a> 标签并移除 rel 属性
13+
const links = document.querySelectorAll('a[rel="noopener noreferrer"]')
14+
links.forEach((link) => {
15+
link.removeAttribute('rel')
16+
})
17+
1218
// page not found
1319
if (document.body.textContent.includes('Page Not Found')) {
1420
let element = document.querySelector('.hero__title') // 使用元素的ID选择元素

0 commit comments

Comments
 (0)