File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
userscripts/youtube-speed-override Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 9
9
// @supportURL https://github.com/0xdevalias/userscripts/issues
10
10
// @downloadURL https://github.com/0xdevalias/userscripts/raw/main/userscripts/youtube-speed-override/youtube-speed-override.user.js
11
11
// @namespace https://www.devalias.net/
12
- // @version 1.3
12
+ // @version 1.3.1
13
13
// @match https://www.youtube.com/*
14
14
// @grant none
15
15
// ==/UserScript==
Original file line number Diff line number Diff line change 6
6
// @supportURL https://github.com/0xdevalias/userscripts/issues
7
7
// @downloadURL https://github.com/0xdevalias/userscripts/raw/main/userscripts/youtube-speed-override/youtube-speed-override.user.js
8
8
// @namespace https://www.devalias.net/
9
- // @version 1.3
9
+ // @version 1.3.1
10
10
// @match https://www.youtube.com/*
11
11
// @grant none
12
12
// ==/UserScript==
150
150
151
151
// Function to update the time display with the adjusted length
152
152
function updateAdjustedTimeDisplay ( ) {
153
+ if ( video . playbackRate === 1 ) return ;
154
+
153
155
const durationSpan = document . querySelector ( videoTimeDisplayDurationSelector ) ;
154
156
155
157
if ( durationSpan ) {
195
197
showSpeedChangeNotification ( ) ;
196
198
} else if ( e . shiftKey && e . code === 'Space' ) {
197
199
// Don't let the default YouTube handler run
200
+ // TODO: these don't seem to actually prevent it currently, as we still seem to pause the video..?
198
201
e . preventDefault ( ) ;
199
202
e . stopPropagation ( ) ;
200
203
204
+ // TODO: not sure if this will work?
205
+ e . stopImmediatePropagation ( )
206
+
201
207
video . playbackRate = 1 ;
202
208
203
209
// Always show the notification, even when we're at our min value
You can’t perform that action at this time.
0 commit comments