diff options
author | zrose584 <57181548+zrose584@users.noreply.github.com> | 2020-10-12 17:52:01 +0200 |
---|---|---|
committer | zrose584 <57181548+zrose584@users.noreply.github.com> | 2020-10-12 17:52:01 +0200 |
commit | d2ee49ec453999904381ec592f38a9a34e02044c (patch) | |
tree | ffb4861d06e8932e41d2c500124d06f7abb17db7 /youtube/static/js/hotkeys.js | |
parent | 2cfc6dec39ccdcc0c5fe2eea73f47b7040e51833 (diff) | |
download | yt-local-d2ee49ec453999904381ec592f38a9a34e02044c.tar.lz yt-local-d2ee49ec453999904381ec592f38a9a34e02044c.tar.xz yt-local-d2ee49ec453999904381ec592f38a9a34e02044c.zip |
add 't' hotkey
Diffstat (limited to 'youtube/static/js/hotkeys.js')
-rw-r--r-- | youtube/static/js/hotkeys.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube/static/js/hotkeys.js b/youtube/static/js/hotkeys.js index b295db9..5688ef3 100644 --- a/youtube/static/js/hotkeys.js +++ b/youtube/static/js/hotkeys.js @@ -36,6 +36,11 @@ function onKeyDown(e) { if (tt.mode == "showing") tt.mode = "disabled"; else tt.mode = "showing"; } + else if (c == "t") { + let video_id = JSON.parse(Q(".video-info input[name=video_info_list]").value).id + let ts = Math.floor(Q("video").currentTime); + copyTextToClipboard(`https://youtu.be/${video_id}?t=${ts}`); + } } window.addEventListener('DOMContentLoaded', function() { |