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

Function goPrevious

scripts/reading.js:1489–1518  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1487
1488//Go to the previous comic page
1489function goPrevious()
1490{
1491 progress.activeSave();
1492
1493 var previousIndex = currentIndex - 1;
1494
1495 readingDirection = realReadingDirection = false;
1496
1497 if(currentIndex > indexNum)
1498 {
1499 showNextComic(2, true);
1500 }
1501 else if(previousIndex > 0 || ((readingViewIs('scroll') && (_config.readingViewAdjustToWidth || _config.readingWebtoon)) && currentPageVisibility > 0))
1502 {
1503 if(_config.readingWebtoon)
1504 goScrollPercent(-70, true);
1505 else
1506 goToIndex(previousIndex, true, true);
1507
1508 music.soundEffect.page();
1509 }
1510 else if(previousIndex == 0 && dom.previousComic() && !readingManga())
1511 {
1512 showPreviousComic(1, true);
1513 }
1514 else if(previousIndex == 0 && dom.nextComic() && readingManga())
1515 {
1516 showPreviousComic(1, true, true);
1517 }
1518}
1519
1520//Go to the start of the comic
1521function goStart(force = false)

Callers 2

goStartFunction · 0.85
readFunction · 0.85

Calls 6

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

Tested by

no test coverage detected