()
| 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 |
no test coverage detected