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

Function goStart

scripts/reading.js:1521–1548  ·  view source on GitHub ↗
(force = false)

Source from the content-addressed store, hash-verified

1519
1520//Go to the start of the comic
1521function goStart(force = false)
1522{
1523 if(force || !readingManga() || 1)
1524 {
1525 const hasComic = readingManga() ? dom.nextComic() : dom.previousComic();
1526 progress.activeSave();
1527
1528 if((currentIndex > indexNum || (currentIndex - 1 == 0 && hasComic)) && (!maxPageVisibility || currentPageVisibility == 0))
1529 {
1530 goPrevious();
1531
1532 return false;
1533 }
1534 else
1535 {
1536 readingDirection = true;
1537 realReadingDirection = false;
1538
1539 goToIndex(1, true);
1540
1541 return true;
1542 }
1543 }
1544 else
1545 {
1546 return goEnd(true);
1547 }
1548}
1549
1550function goPrevComic()
1551{

Callers 2

goPrevComicFunction · 0.85
goEndFunction · 0.85

Calls 4

readingMangaFunction · 0.85
goPreviousFunction · 0.85
goEndFunction · 0.85
goToIndexFunction · 0.70

Tested by

no test coverage detected