cloudtube: Fix broken navigation shortcuts on videos v1 APPLIED

~lomanic: 1
 Fix broken navigation shortcuts on videos

 1 files changed, 2 insertions(+), 2 deletions(-)
 > Thoughts on that?

Please remove that until it's implemented.
Otherwise I would override it **only** if the video is playing.
For whatever reason I cannot reply to your previous comment (didn't receive email), and the website doesn't provide a way to do so (yet, hopefully).

Please don't break this kind of basic function (scrolling), this is not the same thing as Page Up/Down, you can't presume how people navigate your website.

Plus, volume is already controlled by Up/Down arrows when the video is focused (on Firefox at least).

As another example, scrolling with arrows is not broken on Invidious.
You're right. I will remove the up/down catcher.
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~cadence/tube-devel/patches/20205/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH cloudtube] Fix broken navigation shortcuts on videos Export this patch

From: Lomanic <lomanic@hotmail.fr>

Namely, Alt+⬅️/Alt+➡️ (history navigation) and ⬆️/⬇️ vertical scrolling
 html/static/js/player.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/html/static/js/player.js b/html/static/js/player.js
index d32deec..62249a8 100644
--- a/html/static/js/player.js
+++ b/html/static/js/player.js
@@ -197,7 +197,7 @@ video.addEventListener("dblclick", event => {

document.addEventListener("keydown", event => {
	if (["INPUT", "SELECT", "BUTTON"].includes(event.target.tagName)) return
	if (event.ctrlKey || event.shiftKey) return
	if (event.ctrlKey || event.shiftKey || event.altKey) return
	let caught = true
	if (event.key === "j" || event.key === "n") {
@@ -210,7 +210,7 @@ document.addEventListener("keydown", event => {
	} else if (event.key === "ArrowRight") {
	} else if (event.key === "ArrowUp" || event.key === "ArrowDown") {
		// no-op
	} else if (event.key >= "0" && event.key <= "9") {
		video.currentTime = video.duration * (+event.key) / 10
	} else if (event.key === "f") {
I planned to use up/down for volume controls, but haven't implemented it 
yet. Thoughts on that? Page up/down can still be used for keyboard