MCPcopy Index your code
hub / github.com/XIU2/UserScript / getAll

Function getAll

Autopage.user.js:2385–2393  ·  view source on GitHub ↗
(selector, contextNode = undefined, doc = document)

Source from the content-addressed store, hash-verified

2383 }
2384 }
2385 function getAll(selector, contextNode = undefined, doc = document) {
2386 if (!selector) return [];
2387 contextNode = contextNode || doc;
2388 if (selector.slice(0,1) === '/' || selector.slice(0,2) === './' || selector.slice(0,2) === '(/' || selector.slice(0,3) === 'id(') {
2389 return getAllXpath(selector, contextNode, doc);
2390 } else {
2391 return getAllCSS(selector, contextNode);
2392 }
2393 }
2394 // 获取所有父元素
2395 function getAllParentElement(selector, contextNode = undefined, doc = document) {
2396 contextNode = contextNode || doc;

Callers 6

processElemsFunction · 0.85
replaceElemsFunction · 0.85
insScriptFunction · 0.85
getAllParentElementFunction · 0.85
forceTargetFunction · 0.85
cleanuEventFunction · 0.85

Calls 2

getAllXpathFunction · 0.85
getAllCSSFunction · 0.70

Tested by

no test coverage detected