add 't' hotkey

This commit is contained in:
zrose584
2020-10-12 17:52:01 +02:00
parent 2cfc6dec39
commit d2ee49ec45
2 changed files with 64 additions and 0 deletions

View File

@@ -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() {