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

Method addToStage

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

Source from the content-addressed store, hash-verified

8329 }
8330
8331 addToStage() {
8332 this.init();
8333 if (!this.styleEle || !this.styleEle.parentNode) {
8334 this.styleEle = _GM_addStyle(this.cssText);
8335 }
8336 if (!isPause) {
8337 this.frame.classList.remove("stop");
8338 }
8339 setHTML(this.pagenum, curPage);
8340 this.frame.title = i18n("page") + curPage;
8341 if (!this.validPage) {
8342 if (curPage === 1) {
8343 this.frame.classList.add("uninited");
8344 } else {
8345 this.frame.classList.remove("uninited");
8346 this.validPage = true;
8347 }
8348 }
8349 if (this.frame.parentNode) return;
8350 getBody(document).appendChild(this.frame);
8351 clearTimeout(this.hideTimer);
8352 if (!isMobile) {
8353 this.frame.classList.add("minSize");
8354 }
8355 }
8356
8357 remove() {
8358 if (this.frame && this.frame.parentNode) this.frame.parentNode.removeChild(this.frame);

Callers 1

setupMethod · 0.95

Calls 5

initMethod · 0.95
removeMethod · 0.80
setHTMLFunction · 0.70
i18nFunction · 0.70
getBodyFunction · 0.70

Tested by

no test coverage detected