MCPcopy Create free account
hub / github.com/MALSync/MALSync / init

Function init

src/pages/AniDream/main.ts:74–101  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

72 },
73 },
74 init(page) {
75 api.storage.addStyle(
76 require('!to-string-loader!css-loader!less-loader!./style.less').toString(),
77 );
78
79 let _debounce;
80
81 utils.changeDetect(check, () => j.$('#syncData').text());
82 check();
83
84 function check() {
85 page.reset();
86 if (j.$('#syncData').length) {
87 jsonData = JSON.parse(j.$('#syncData').text());
88 clearTimeout(_debounce);
89 _debounce = setTimeout(() => {
90 page.handlePage();
91 }, 500);
92 }
93 }
94
95 utils.changeDetect(
96 () => {
97 page.handleList();
98 },
99 () => j.$('.ms-episodes').text(),
100 );
101 },
102};

Callers

nothing calls this directly

Calls 3

addStyleMethod · 0.80
handleListMethod · 0.80
checkFunction · 0.70

Tested by

no test coverage detected