| 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); |