Skip to content

Commit 8635386

Browse files
authored
Added YouTube as exception
Else it speeds up twice
1 parent eb88803 commit 8635386

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

AddYouTubeShortcuts.user.js

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// @updateURL https://raw.githubusercontent.com/kevduc/userscripts/master/AddYouTubeShortcuts.user.js
1010
// @supportURL https://github.com/kevduc/userscripts/issues
1111
// @include *
12+
// @exclude https://www.youtube.com/*
13+
// remove the line above if you want to run the script on YouTube
1214
// @grant none
1315
// @run-at document-end
1416
// @icon https://www.google.com/s2/favicons?sz=128&domain=youtube.com
@@ -62,6 +64,7 @@
6264

6365
document.addEventListener('keydown', (e) => {
6466
const video = closestSibling(document.activeElement, 'video')
67+
if (video === null) return
6568
const notifySpeed = (speed) => notify(`${speed}x`, 1500)
6669

6770
switch (e.key) {

0 commit comments

Comments
 (0)