Skip to content

Commit

Permalink
Upd: scripts/reading.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm committed Jan 12, 2025
1 parent 5432612 commit 794a084
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions scripts/reading.js
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ function calculateRealReadingDirection(index)
}

//Go to a specific comic index
function goToIndex(index, animation = true, nextPrevious = false, end = false, direction = 0)
function goToIndex(index, animation = true, nextPrevious = false, end = false)
{
let animationDurationS = ((animation) ? _config.readingViewSpeed : 0);
let animationDurationMS = animationDurationS * 1000;
Expand Down Expand Up @@ -1257,8 +1257,6 @@ function goToIndex(index, animation = true, nextPrevious = false, end = false, d
let largerImage = returnLargerImage(eIndex-1);
let scrollTop = (largerImage.top - rect.top) + content.scrollTop;

console.log(largerImage.top, rect.top);

let scrollSum = 0;

if((readingViewIs('scroll') && (_config.readingViewAdjustToWidth || _config.readingWebtoon)) && pageVisibilityIndex !== false)
Expand All @@ -1277,8 +1275,6 @@ function goToIndex(index, animation = true, nextPrevious = false, end = false, d
}
}

console.log(content.scrollTop, scrollTop, scrollSum);

clearTimeout(disableOnScrollST);

disableOnScroll(true);
Expand Down Expand Up @@ -1384,7 +1380,7 @@ function goNext()
}
else if(nextIndex <= indexNum || ((readingViewIs('scroll') && (_config.readingViewAdjustToWidth || _config.readingWebtoon)) && currentPageVisibility < maxPageVisibility))
{
goToIndex(nextIndex, true, true, false, 1);
goToIndex(nextIndex, true, true);
music.soundEffect.page();
}
else if(currentIndex == indexNum && dom.nextComic() && (!_config.readingManga || readingViewIs('scroll')))
Expand Down Expand Up @@ -1412,7 +1408,7 @@ function goPrevious()
}
else if(previousIndex > 0 || ((readingViewIs('scroll') && (_config.readingViewAdjustToWidth || _config.readingWebtoon)) && currentPageVisibility > 0))
{
goToIndex(previousIndex, true, true, false, -1);
goToIndex(previousIndex, true, true);
music.soundEffect.page();
}
else if(previousIndex == 0 && dom.previousComic() && (!_config.readingManga || readingViewIs('scroll')))
Expand Down

0 comments on commit 794a084

Please sign in to comment.