WTR-Lab Auto Scroller

Adds dual-mode auto-scrolling (Constant Speed or Dynamic WPM) to the WTR-Lab reader for a hands-free reading experience.

这些是此脚本变更过代码的版本。 显示所有版本。

  • v5.1 2025-10-30

    Changelog

    • v5.1
      • Consistent Behavior: The "Constant" speed mode now also pauses and resumes when you manually scroll, just like the Dynamic mode. This creates a more consistent and intuitive experience across the entire script.
    • v5.0
      • 🚀 Manual Scrolling Freedom: You can now manually scroll up or down while auto-scrolling is active. The script will pause and then intelligently resume from your new position.
      • 🐛 Fixed Scroll Lock: Resolved an issue where the page would feel "locked" and prevent manual scrolling while the script was active.
  • v4.8 2025-10-26

    Changelog

    • v4.8
      • Fixed a race condition where the script would fail to find the Play/Stop button on new chapters, preventing auto-scroll from resuming. The script now proactively searches for the button to ensure it starts reliably.
    • v4.7
      • Fixed an issue where the Play/Stop button would not update its state to 'Stop' when auto-scrolling resumed on a new chapter.
  • v4.6 2025-10-26

    Changelog

    Version 4.6

    • Major Fix (Dynamic Mode): Overhauled the Dynamic WPM scrolling logic for a significantly smoother experience. Instead of "jumping" to the top of each paragraph, the script now scrolls continuously through the entire height of the paragraph over its calculated reading time. This eliminates stuttering and creates a natural, adaptive reading flow.
    • Improvement (Dynamic Mode): Switched the scroll animation to a linear easing curve, removing the acceleration/deceleration effect at the start and end of each paragraph, which contributes to the new, smoother feel.
    • Improvement (Dynamic Mode): Added logic to correctly handle resuming mid-paragraph. The scroll duration is now prorated based on the remaining visible portion, ensuring accurate timing.
    • Improvement (UX): Increased the auto-restart delay on new chapter navigation from 750ms to 5000ms (5 seconds). This gives users a comfortable pause to orient themselves before scrolling begins again.
    • Robustness: Added a check to ensure the chapter body has loaded before attempting to start scrolling, preventing potential errors on slow page loads.
  • v4.5 2025-10-25

    Changelog

    Version 4.5

    • Fix (Dynamic WPM Mode): The scroller will now correctly and immediately stop when it reaches the bottom of the page (i.e., when there is nothing left to scroll). This resolves an issue where the user had to wait for the script to finish reading the last few paragraphs even after reaching the end of the chapter's content. The behavior now matches the "Constant Speed Mode" for a more consistent and intuitive experience.
  • v4.4 2025-10-22

    Changelog

    v4.4

    • Bug Fix: Resolved a critical issue where returning to an inactive tab after a long period would cause the dynamic scroller to rapidly skip to the end of the chapter and lock the scrollbar. The animation logic is now robustly paused by canceling the animation frame and saving its progress, ensuring a perfect and smooth resume.

    v4.3

    • Bug Fix: Fixed an issue where the dynamic scroller would incorrectly stop after returning to the reader tab. The script now correctly ignores browser-fired scroll events that occur when a tab regains focus, allowing the pause/resume feature to work as intended.

    v4.2

    • Fix & Enhancement:
      • Fixed a bug in Dynamic mode where paragraphs were sometimes skipped incorrectly. Position detection now uses getBoundingClientRect() for greater reliability.
      • Implemented the initial pause-and-resume feature for Dynamic mode when switching tabs.
  • v4.1 2025-10-22

    Changelog

    v4.1 (Latest)

    • FIX: Resolved a critical bug in Dynamic WPM mode where scrolling would break upon navigating to the next chapter. The script now correctly identifies and targets the content of the new, active chapter instead of attempting to read the old, hidden one.

    v4.0

    • Major UI Overhaul: Completely redesigned the control panel for clarity and ease of use.
      • Replaced the single input with separate, clearly labeled inputs for Speed (SPD) and Words Per Minute (WPM) that appear based on the selected mode.
      • Introduced a dedicated Constant/Dynamic button group to switch between scrolling modes.
      • Redesigned the paragraph highlighting toggle as a more modern and compact switch.
      • Improved layout and styling to better match the website's native design.

    v3.8

    • Internal version used for development and testing of the UI overhaul.

    v3.5

    • Feature: Added a "Toggle Debug Logging" command to the Tampermonkey menu for easier troubleshooting.
    • Improvement: General code refactoring and cleanup for better performance and maintainability.

    v3.1

    • Fix: Improved the paragraph detection logic in Dynamic WPM mode to better handle empty lines and unusual formatting, preventing stalls.

    v3.0

    • MAJOR FEATURE: Dynamic WPM Mode!
      • Introduced a brand new "Dynamic" scrolling mode that operates based on Words Per Minute (WPM).
      • The script now reads paragraph by paragraph, calculating the time needed based on word count and your set WPM.
      • Added Paragraph Highlighting to visually track the current paragraph in Dynamic mode.
      • The UI was updated to allow switching between the classic "Constant" mode and the new "Dynamic" mode.

    v2.8

    • Behavior Change: Changed the "smart pause on user scroll" feature to a "smart stop". The script will now fully stop when you manually scroll, giving you more predictable control. You must press 'Play' again to resume.
    • Improvement: Refined the next-chapter detection logic to be faster and more reliable.
  • v2.7 2025-10-21
  • v2.6 2025-10-20

    Changelog

    Version 2.6

    • FIX: Implemented a URL checker to reliably detect navigation to a new chapter on the single-page application (SPA) style website.
    • FIX: The script now correctly resumes auto-scrolling on the next chapter, even if it had automatically stopped at the bottom of the previous one. This resolves the core issue of the scroller not starting on a new page.
    • Improved the startScrolling logic to ensure it begins near the top of the new content after navigation.

    Version 2.5

    • FIX (Attempted): Added a 2-second "grace period" on page load to prevent the scroller from stopping immediately before content could fully render. (This approach was superseded by the more robust fix in v2.6).
  • v2.4 2025-10-19

    Changelog

    Version 2.4

    • New: Implemented Persistent Play Intent. Auto-scroll will now automatically resume on the next chapter if it was active on the previous one.
    • Change: Reaching the end of a page now only pauses the scroller for that page; it no longer disables the auto-scroll setting. Clicking the "Stop" button is now the explicit way to disable the feature across pages.

    Version 2.3

    • Fixed: Corrected a bug where auto-scroll would continue indefinitely on mobile after reaching the bottom of the page. The scroller now correctly detects the end of the content and stops.
    • Fixed: Addressed an issue where the screen Wake Lock would fail to re-engage after switching browser tabs and returning. The lock is now reliably re-acquired when the tab becomes visible again.
  • v2.2 2025-10-10