| 552 | } |
| 553 | |
| 554 | public async onsiteSearch(): Promise<false | SearchResult> { |
| 555 | if (this.page && this.syncPage && this.syncPage.curState && this.syncPage.curState.on) { |
| 556 | let result: false | string = false; |
| 557 | if (this.syncPage.curState.on === 'OVERVIEW') { |
| 558 | if (this.page.overview && this.page.overview.getMalUrl) { |
| 559 | result = await this.page.overview.getMalUrl(api.settings.get('syncMode')); |
| 560 | } |
| 561 | } else if (this.page.sync && this.page.sync.getMalUrl) { |
| 562 | result = await this.page.sync.getMalUrl(api.settings.get('syncMode')); |
| 563 | } |
| 564 | if (result) { |
| 565 | this.logger.m('Onsite').log('[SEARCH]', 'Overwrite by onsite url', result); |
| 566 | return { |
| 567 | url: result, |
| 568 | offset: 0, |
| 569 | provider: 'sync', |
| 570 | similarity: { |
| 571 | same: true, |
| 572 | value: 1, |
| 573 | }, |
| 574 | }; |
| 575 | } |
| 576 | } |
| 577 | return false; |
| 578 | } |
| 579 | |
| 580 | public openCorrection() { |
| 581 | /* Implemented in vueSearchClass */ |