From c73aaceb8966bbc80e249b916cea8db639b6c9f8 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sun, 30 Jan 2022 02:25:11 +0100 Subject: show video img, respond to spacebar --- website/resources/js/main.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'website/resources/js') diff --git a/website/resources/js/main.js b/website/resources/js/main.js index cbda59b9..eaf5e188 100644 --- a/website/resources/js/main.js +++ b/website/resources/js/main.js @@ -1,14 +1,6 @@ "use strict"; (function($) { - function clickToTap() { - if (matchMedia && matchMedia('(hover: none)').matches) $(".clickToTap").each(function() { - var x = $(this); - if (x.text() === "Click") x.text("Tap"); - else x.text("tap"); - }); - } - function clickForVideo() { var cfv = $("#clickForVideo"); var f = function() { @@ -41,7 +33,13 @@ video.currentTime = (((h * 60) + m) * 60) + s; } - $(clickToTap); + function aButtonsRespondToSpacebar() { + $('a[role="button"]').keyup(function(e) { + if (e.which == 32) e.target.click(); + }); + } + $(clickForVideo); $(seekVideo); + $(aButtonsRespondToSpacebar); })($); -- cgit