mirror of
https://github.com/SoPat712/Speeder.git
synced 2026-10-08 03:03:14 -04:00
fix(controller): fall back to lastSpeed for Shorts when rememberSpeed is active
This commit is contained in:
2 files changed
+35
-1
No files matched your search
@@ -733,6 +733,13 @@ function getRememberedSpeed(video) {
|
||||
var videoSpeed = tc.settings.speeds[sourceKey];
|
||||
if (isValidSpeed(videoSpeed)) return videoSpeed;
|
||||
}
|
||||
|
||||
// No per-source entry yet — fall back to the most recently used speed.
|
||||
// This ensures e.g. YouTube Shorts carry the user's chosen speed to the
|
||||
// next Short even when that exact source URL hasn't been visited before.
|
||||
if (isValidSpeed(tc.settings.lastSpeed)) {
|
||||
return tc.settings.lastSpeed;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user