MCPcopy Create free account
hub / github.com/XIU2/UserScript / Process

Function Process

DuckDuckGo-Enhanced.user.js:100–113  ·  view source on GitHub ↗
(target)

Source from the content-addressed store, hash-verified

98 observer.observe(document, { childList: true, subtree: true });
99
100 function Process(target) {
101 const a = target.querySelector('h2>a,a[data-testid=result-title-a]')
102 if (a) {
103 if (checkDomain(a.href.split('/')[2])) {
104 target.hidden = true
105 } else {
106 // 链接不携来源
107 addRel(target);
108
109 // 添加屏蔽按钮
110 addBlockDomainBtn(target, a, a.href.split('/')[2]);
111 }
112 }
113 }
114 }
115
116

Callers 1

callbackFunction · 0.85

Calls 3

checkDomainFunction · 0.85
addRelFunction · 0.85
addBlockDomainBtnFunction · 0.85

Tested by

no test coverage detected