rNeomy / reader-view

Access Firefox's built in reader view from right click context menu
https://webextension.org/listing/chrome-reader-view.html
Mozilla Public License 2.0
481 stars 75 forks source link

Next/Previous chapter navigation #178

Closed Shrulik closed 1 year ago

Shrulik commented 1 year ago

Wrote the changes we discussed here #177.

extractChapLinks now comes with a confidenceThreshold (default is 0.5), also if I find multiple candidates for the next chapter of equal confidence, I currently return none, since this requires just coin tossing and implies the algorithm failed.

I'm still tuning the meaning of the confidenceThreshold values, but it seems to work correctly for the cases I tried. I will use in the wild and fix appropriately.

Moved the testing and ui to this branch edge-next_and_ui

rNeomy commented 1 year ago

Looks good!

For the visual part, we now have a dedicated plugin. This plugin has a new section at the bottom of the page to display navigation buttons for the previous and next chapters. These buttons are simple links that allow users to quickly jump to related content.

If a user has previously enabled the "Open links in the reader view mode" option, the extension will convert the page to reader view when the user clicks these navigation links. This ensures a consistent user experience.

Could you adjust the indentation of "NextChap.js" to match the 2-space standard used throughout the rest of the code? It appears that you haven't applied the linter to this file. I don't mind, but maintaining consistent styling is a plus. Additionally, it would be helpful to include a comment at the top of the file with information on how to contact you for reporting bugs or suggesting enhancements.

Screenshot 2023-10-25 at 03 10 38