Automatically clicks the next chapter button after customizable time, continues timer after audio ends, auto-minimizes on inactivity
這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。
Key Changes Made to Auto-Next Chapter (v1.4 → v1.5)1. Timer Continues Running After Audio EndsAdded a new audioHasEnded flag to track when audio has ended naturallyModified the audio event listeners to distinguish between manual pause and natural endAdded specific event listener for the 'ended' event that sets the flag but doesn't pause the timerUpdated pause behavior to only pause the timer on manual pauses, not when audio ends naturally2. Auto-Minimize FunctionalityAdded inactivity timer with 4-second timeout (matching the Audio Controls script)Implemented resetInactivityTimer() function to manage auto-minimize behaviorAdded document-level click detection to minimize when clicking outside the panelAdded event listeners to reset timer on user interaction with the panelModified all UI interaction points to reset the inactivity timer3. Additional ImprovementsAdded version display in the control panel (showing v1.5)Added reset calls for the inactivity timer to all interactive elementsImproved code organization with better commentsAdded event propagation handling to prevent minimizing when clicking inside the panel4. Functionality TestingThe script should:Continue running the timer after audio endsAuto-minimize after 4 seconds of inactivityMinimize when clicking outside the panelReset the inactivity timer whenever the user interacts with the panel
Main Changes:Updated the version number to 1.2 in the UserScript headerModified the setTimerFromAudioDuration() function to:Get the current playback rate from localStorage (where the Audio Controls script stores it)Calculate timer as audio duration ÷ playback speed + 10 seconds bufferDisplay the playback speed in the UIAdded a new playback rate display element to show the current speedAdded a setupPlaybackRateMonitor() function that:Checks for playback rate changes every 2 secondsAdjusts the remaining time proportionally when speed changesUpdates the playback rate display
New Features Added:Auto-Play Audio After Chapter NavigationAfter changing to a new chapter (either automatically or manually), the audio will automatically start playing after a 3-second delayA notification will appear: "Auto-playing audio in 3 seconds..." followed by "Audio playing automatically"Works with both the auto-next timer and manual "Next" button clicksDefault Playback Speed Set to 0.7xChanged the default audio playback rate from 1.0x to 0.7xThis setting applies to new users and when the script is first installedExisting users who have already set a custom speed will keep their preference