MCPcopy Index your code
hub / github.com/MALSync/MALSync / init

Method init

src/simkl/simklClass.ts:47–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 15

constructorMethod · 0.95
MaterialButtonFunction · 0.45
MaterialCheckboxFunction · 0.45
MaterialIconToggleFunction · 0.45
MaterialMenuFunction · 0.45
MaterialProgressFunction · 0.45
MaterialRadioFunction · 0.45
MaterialSliderFunction · 0.45
MaterialSpinnerFunction · 0.45
MaterialSwitchFunction · 0.45
MaterialTabsFunction · 0.45
MaterialTextfieldFunction · 0.45

Calls 6

authenticationMethod · 0.95
streamingUIMethod · 0.95
malToKissMethod · 0.95
pageRelationMethod · 0.95
waitForPageToBeVisibleFunction · 0.90
createAppFunction · 0.90

Tested by

no test coverage detected