(list)
| 365 | }); |
| 366 | |
| 367 | function fullListCallback(list) { |
| 368 | let cover = true; |
| 369 | if ($('.library-list tbody tr').length) cover = false; |
| 370 | con.log(list); |
| 371 | $.each(list, async (index, en: listElement & { kitsuSlug: string }) => { |
| 372 | con.log('en', en); |
| 373 | if (typeof en.malId !== 'undefined' && en.malId !== null && en.malId) { |
| 374 | const element = $( |
| 375 | `.library-grid-popover:not(.malSyncDone2) a[href^="/${This.page!.type}/${ |
| 376 | en.kitsuSlug |
| 377 | }"], .library-list tbody tr:not(.malSyncDone2) a[href^="/${This.page!.type}/${ |
| 378 | en.kitsuSlug |
| 379 | }"]`, |
| 380 | ) |
| 381 | .first() |
| 382 | .parent() |
| 383 | .parent() |
| 384 | .parent(); |
| 385 | con.log(element); |
| 386 | element.addClass('malSyncDone2'); |
| 387 | |
| 388 | if (en.options && en.options.u) { |
| 389 | con.log(en.options.u); |
| 390 | |
| 391 | if (cover) { |
| 392 | element.prepend( |
| 393 | j.html(` |
| 394 | <a class="mal-sync-stream mal-rem" title="${ |
| 395 | en.options.u.split('/')[2] |
| 396 | }" target="_blank" style="margin: 0 0; z-index: 22; position:absolute; left: 0px; top: 0px; background-color: #ffffff5c; padding: 0 5px 3px 5px;" href="${ |
| 397 | en.options.u |
| 398 | }"> |
| 399 | <img src="${utils.favicon(en.options.u.split('/')[2])}"> |
| 400 | </a>`), |
| 401 | ); |
| 402 | } else { |
| 403 | element.find('.title-wrapper').append( |
| 404 | j.html(` |
| 405 | <a class="mal-sync-stream mal-rem" title="${ |
| 406 | en.options.u.split('/')[2] |
| 407 | }" target="_blank" style="padding: 0 5px;" href="${en.options.u}"> |
| 408 | <img src="${utils.favicon(en.options.u.split('/')[2])}"> |
| 409 | </a>`), |
| 410 | ); |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | const resumeUrlObj = en.options!.r; |
| 415 | const continueUrlObj = en.options!.c; |
| 416 | |
| 417 | const curEp = en.watchedEp; |
| 418 | |
| 419 | con.log('Resume', resumeUrlObj, 'Continue', continueUrlObj); |
| 420 | if (continueUrlObj && continueUrlObj.ep === curEp + 1) { |
| 421 | if (cover) { |
| 422 | element.prepend( |
| 423 | j.html( |
| 424 | `<a class="nextStream mal-rem" title="Continue watching" target="_blank" style="color: #BABABA; z-index: 22; position:absolute; top: 0px; left: 26px; background-color: #ffffff5c; padding: 0 5px 3px 5px;" href="${ |
nothing calls this directly
no test coverage detected