MCPcopy Index your code
hub / github.com/ollm/OpenComic / goToImage

Function goToImage

scripts/reading.js:1036–1055  ·  view source on GitHub ↗
(imageIndex, disableSave = false)

Source from the content-addressed store, hash-verified

1034
1035//Go to a specific comic image
1036function goToImage(imageIndex, disableSave = false)
1037{
1038 if(typeof imagesData[imageIndex] !== 'undefined')
1039 {
1040 if(!disableSave)
1041 progress.activeSave();
1042
1043 readingDirection = true;
1044
1045 let newIndex = imagesData[imageIndex].position + 1;
1046
1047 if(readingManga())
1048 newIndex = (indexNum - newIndex) + 1;
1049
1050 calculateRealReadingDirection(newIndex);
1051
1052 goToIndex(newIndex);
1053 goToImageCL(imageIndex, true)
1054 }
1055}
1056
1057//Go to a specific comic folder
1058function goToFolder(folderIndex)

Callers 1

goToPageFunction · 0.70

Calls 4

readingMangaFunction · 0.85
goToImageCLFunction · 0.85
goToIndexFunction · 0.70

Tested by

no test coverage detected