MCPcopy Index your code
hub / github.com/hoothin/UserScripts / checkInputSelector

Method checkInputSelector

Pagetual/pagetual.user.js:9325–9341  ·  view source on GitHub ↗
(fill = true)

Source from the content-addressed store, hash-verified

9323 }
9324
9325 checkInputSelector(fill = true) {
9326 let self = this;
9327 this.clearSigns();
9328 if (!this.selectorInput.value) return;
9329 let eles = getAllElements(this.selectorInput.value, document);
9330 this.foundEle = null;
9331 if (eles && eles.length > 0) {
9332 this.foundEle = eles;
9333 eles.forEach(ele => {
9334 let sign = self.createSignDiv();
9335 document.documentElement.appendChild(sign);
9336 self.adjustSignDiv(sign, ele);
9337 self.signList.push(sign);
9338 });
9339 if (fill) this.fillTempRuleTextarea();
9340 }
9341 }
9342
9343 clearSigns() {
9344 this.signList.forEach(sign => {

Callers 3

setSelectorDivMethod · 0.95
initMethod · 0.80
geneSelectorItemMethod · 0.80

Calls 5

clearSignsMethod · 0.95
fillTempRuleTextareaMethod · 0.95
getAllElementsFunction · 0.85
createSignDivMethod · 0.80
adjustSignDivMethod · 0.80

Tested by

no test coverage detected