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

Function init

src/pages/MangaReader/main.ts:106–132  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

104 },
105 },
106 init(page) {
107 api.storage.addStyle(
108 require('!to-string-loader!css-loader!less-loader!./style.less').toString(),
109 );
110
111 let _debounce;
112
113 utils.changeDetect(check, () => j.$('#syncData').text());
114 check();
115
116 utils.changeDetect(
117 () => page.handleList(),
118 () => j.$('#c-selected-lang').text(),
119 );
120
121 function check() {
122 page.reset();
123 if (j.$('#syncData').length) {
124 jsonData = JSON.parse(j.$('#syncData').text());
125
126 clearTimeout(_debounce);
127 _debounce = setTimeout(() => {
128 page.handlePage();
129 }, 500);
130 }
131 }
132 },
133};

Callers

nothing calls this directly

Calls 3

addStyleMethod · 0.80
handleListMethod · 0.80
checkFunction · 0.70

Tested by

no test coverage detected