()
| 45 | } |
| 46 | |
| 47 | async init() { |
| 48 | await waitForPageToBeVisible(); |
| 49 | con.log(this.url); |
| 50 | |
| 51 | clearInterval(this.interval2); |
| 52 | |
| 53 | if (this.url.indexOf('apps/chrome/mal-sync') > -1) { |
| 54 | this.authentication(); |
| 55 | } |
| 56 | |
| 57 | const urlpart = utils.urlPart(this.url, 3); |
| 58 | const url2part = utils.urlPart(this.url, 4); |
| 59 | |
| 60 | if ((urlpart === 'anime' || urlpart === 'manga') && !Number.isNaN(Number(url2part))) { |
| 61 | const malObj = new SimklSingle(this.url); |
| 62 | await malObj.update(); |
| 63 | |
| 64 | this.page = { |
| 65 | page: 'detail', |
| 66 | id: malObj.getIds().simkl, |
| 67 | malid: malObj.getIds().mal, |
| 68 | type: urlpart, |
| 69 | malObj, |
| 70 | }; |
| 71 | con.log('page', this.page); |
| 72 | |
| 73 | if (!$('#malkiss').length) |
| 74 | $('.SimklTVAboutBlockTitle, .simkltvdetailmobilesummaryinfo').after( |
| 75 | j.html('<div id="malkiss"></div>'), |
| 76 | ); |
| 77 | if (this.malkiss) this.malkiss.$.appContext.app.unmount(); |
| 78 | this.malkiss = createApp(malkiss, '#malkiss'); |
| 79 | |
| 80 | this.streamingUI(); |
| 81 | this.malToKiss(); |
| 82 | this.pageRelation(); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | async getMalUrl() { |
| 87 | const urlpart = utils.urlPart(this.url, 3); |
no test coverage detected