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

Method start

Pagetual/pagetual.user.js:9350–9385  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9348 }
9349
9350 start() {
9351 this.init();
9352 if (this.inPicker) return;
9353 this.inPicker = true;
9354 if (!this.styleEle || !this.styleEle.parentNode) {
9355 this.styleEle = _GM_addStyle(this.cssText);
9356 }
9357 document.documentElement.appendChild(this.frame);
9358 document.documentElement.appendChild(this.mainSignDiv);
9359 getBody(document).classList.add("pagetual-picker");
9360
9361 this.logoBtn.classList.remove("showSign");
9362 this.showSign = true;
9363
9364 getBody(document).addEventListener("mousemove", this.moveHandler, true);
9365 getBody(document).addEventListener("click", this.clickHandler, true);
9366 this.xpath.checked = isXPath(ruleParser.curSiteRule.pageElement);
9367 this.tempRule.value = "";
9368 this.editTemp = null;
9369 this.frame.classList.remove("showDetail");
9370
9371 this.loadNow.style.display = ruleParser.nextLinkHref ? "block" : "none";
9372 if (ruleParser.curSiteRule.nextLink && Array && Array.isArray && Array.isArray(ruleParser.curSiteRule.nextLink)) {
9373 this.nextSwitchBtn.style.display = "block";
9374 } else {
9375 this.nextSwitchBtn.style.display = "none";
9376 }
9377 this.autoScrollBtn.innerText = i18n(autoScroll ? "disableAutoScroll" : "enableAutoScroll");
9378
9379 let pageElementSel = ruleParser.curSiteRule.pageElement || "";
9380 if (Array && Array.isArray && Array.isArray(pageElementSel)) {
9381 pageElementSel = pageElementSel[nextIndex < pageElementSel.length ? nextIndex : 0];
9382 }
9383 this.setSelectorDiv(pageElementSel);
9384 this.fillTempRuleTextarea();
9385 }
9386 }
9387 const picker = new Picker();
9388

Callers 10

contentScriptFunction · 0.45
playSoundFunction · 0.45
checkFloatBarFunction · 0.45
checkFloatBarFunction · 0.45
initMethod · 0.45
mouseDownHandlerMethod · 0.45
initMethod · 0.45
initRulesFunction · 0.45
initPageFunction · 0.45
createPageBarFunction · 0.45

Calls 7

initMethod · 0.95
setSelectorDivMethod · 0.95
fillTempRuleTextareaMethod · 0.95
removeMethod · 0.80
getBodyFunction · 0.70
isXPathFunction · 0.70
i18nFunction · 0.70

Tested by

no test coverage detected