Skip to content

Commit e0843d6

Browse files
committed
[userscript] youtube-speed-override: allow shift+space to reset playback speed to 1x
1 parent 1891d53 commit e0843d6

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

userscripts/youtube-speed-override/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// @supportURL https://github.com/0xdevalias/userscripts/issues
1010
// @downloadURL https://github.com/0xdevalias/userscripts/raw/main/userscripts/youtube-speed-override/youtube-speed-override.user.js
1111
// @namespace https://www.devalias.net/
12-
// @version 1.0
12+
// @version 1.2
1313
// @match https://www.youtube.com/*
1414
// @grant none
1515
// ==/UserScript==

userscripts/youtube-speed-override/youtube-speed-override.user.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// @supportURL https://github.com/0xdevalias/userscripts/issues
77
// @downloadURL https://github.com/0xdevalias/userscripts/raw/main/userscripts/youtube-speed-override/youtube-speed-override.user.js
88
// @namespace https://www.devalias.net/
9-
// @version 1.1
9+
// @version 1.2
1010
// @match https://www.youtube.com/*
1111
// @grant none
1212
// ==/UserScript==
@@ -146,6 +146,15 @@
146146
video.playbackRate -= 0.25;
147147
}
148148

149+
// Always show the notification, even when we're at our min value
150+
showSpeedChangeNotification();
151+
} else if (e.shiftKey && e.code === 'Space') {
152+
// Don't let the default YouTube handler run
153+
e.preventDefault();
154+
e.stopPropagation();
155+
156+
video.playbackRate = 1;
157+
149158
// Always show the notification, even when we're at our min value
150159
showSpeedChangeNotification();
151160
}

0 commit comments

Comments
 (0)