MCPcopy
hub / github.com/ollm/OpenComic / goNext

Function goNext

scripts/reading.js:1457–1486  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1455
1456//Go to the next comic page
1457function goNext()
1458{
1459 progress.activeSave();
1460
1461 var nextIndex = currentIndex + 1;
1462
1463 readingDirection = realReadingDirection = true;
1464
1465 if(currentIndex < 1)
1466 {
1467 showPreviousComic(2, true);
1468 }
1469 else if(nextIndex <= indexNum || ((readingViewIs('scroll') && (_config.readingViewAdjustToWidth || _config.readingWebtoon)) && currentPageVisibility < maxPageVisibility))
1470 {
1471 if(_config.readingWebtoon)
1472 goScrollPercent(70, true);
1473 else
1474 goToIndex(nextIndex, true, true);
1475
1476 music.soundEffect.page();
1477 }
1478 else if(currentIndex == indexNum && dom.nextComic() && !readingManga())
1479 {
1480 showNextComic(1, true);
1481 }
1482 else if(currentIndex == indexNum && dom.previousComic() && readingManga())
1483 {
1484 showNextComic(1, true, true);
1485 }
1486}
1487
1488//Go to the previous comic page
1489function goPrevious()

Callers 2

goEndFunction · 0.85
readFunction · 0.85

Calls 6

showPreviousComicFunction · 0.85
readingViewIsFunction · 0.85
goScrollPercentFunction · 0.85
readingMangaFunction · 0.85
showNextComicFunction · 0.85
goToIndexFunction · 0.70

Tested by

no test coverage detected