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

Function readMe

webpackConfig/descriptions.js:130–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128
129readMe();
130function readMe() {
131 const pageList = Object.values(pages);
132
133 const animes = [];
134 const mangas = [];
135 const medias = [
136 '<a href="http://app.emby.media"><img src="https://favicon.malsync.moe/?domain=app.emby.media"></a> <a href="http://app.emby.media">Emby</a> <a href="https://github.com/MALSync/MALSync/wiki/Emby-Plex#emby">[Wiki]</a>',
137 '<a href="http://app.plex.tv"><img src="https://favicon.malsync.moe/?domain=http://app.plex.tv"></a> <a href="http://app.plex.tv">Plex</a> <a href="https://github.com/MALSync/MALSync/wiki/Emby-Plex#plex">[Wiki]</a>',
138 '<a href="https://jellyfin.org/"><img src="https://favicon.malsync.moe/?domain=https://jellyfin.org/"></a> <a href="https://jellyfin.org/">Jellyfin</a> <a href="https://github.com/MALSync/MALSync/wiki/Emby-Plex#jellyfin">[Wiki]</a>',
139 '<a href="https://komga.org/"><img src="https://favicon.malsync.moe/?domain=https://komga.org/"></a> <a href="https://komga.org/">Komga</a> <a href="https://github.com/MALSync/MALSync/wiki/Emby-Plex#komga">[Wiki]</a>',
140 '<a href="https://suwayomi.org/"><img src="https://favicon.malsync.moe/?domain=https://suwayomi-webui-preview.github.io/"></a> <a href="https://suwayomi.org/">Suwayomi</a> <a href="https://github.com/MALSync/MALSync/wiki/Emby-Plex#suwayomi">[Wiki]</a>',
141 '<a href="https://www.kavitareader.com/"><img src="https://favicon.malsync.moe/?domain=https://www.kavitareader.com/"></a> <a href="https://www.kavitareader.com/">Kavita</a> <a href="https://github.com/MALSync/MALSync/wiki/Emby-Plex#kavita">[Wiki]</a>',
142 ];
143
144 for (var page in pageList) {
145 page = pageList[page];
146
147 if (typeof page.domain === 'object') page.domain = page.domain[0];
148
149 const str = `<a href="${page.domain}"><img src="https://favicon.malsync.moe/?domain=${page.domain}"> ${page.name}</a>`;
150
151 if (page.name === 'Emby' || page.name === 'Plex' || page.name === 'Jellyfin' || page.name === 'Komga' || page.name === 'Suwayomi' || page.name === 'Kavita') {
152 continue;
153 }
154
155 if (page.name === 'MangaNato') {
156 mangas.push(
157 '<a href="https://proxer.me"><img src="https://favicon.malsync.moe/?domain=https://proxer.me"> Proxer</a>',
158 );
159 }
160
161 if (page.type === 'anime') {
162 animes.push(str);
163 } else {
164 mangas.push(str);
165 }
166 }
167
168 let html = `
169 <table>
170 <thead>
171 <tr>
172 <th>Anime</th>
173 <th>Manga</th>
174 <th>Media Server</th>
175 </tr>
176 </thead>
177 <tbody>
178 `;
179 for (var page in animes.length >= mangas.length ? animes : mangas) {
180 anime = animes[page];
181 manga = mangas[page];
182 media = medias[page];
183 if (typeof anime === 'undefined') anime = '';
184 if (typeof manga === 'undefined') manga = '';
185 if (typeof media === 'undefined') media = '';
186
187 html += `<tr>

Callers 1

descriptions.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected