diff options
author | Roel Spilker <r.spilker@gmail.com> | 2022-01-30 02:25:11 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2022-01-30 02:25:11 +0100 |
commit | c73aaceb8966bbc80e249b916cea8db639b6c9f8 (patch) | |
tree | ca3b595be6f02879474eb7e2843a8a2cc139050a /website/resources/js/main.js | |
parent | 17a2e297743488028bed2507452c5d495243a0c8 (diff) | |
download | lombok-c73aaceb8966bbc80e249b916cea8db639b6c9f8.tar.gz lombok-c73aaceb8966bbc80e249b916cea8db639b6c9f8.tar.bz2 lombok-c73aaceb8966bbc80e249b916cea8db639b6c9f8.zip |
show video img, <a role="button"> respond to spacebar
Diffstat (limited to 'website/resources/js/main.js')
-rw-r--r-- | website/resources/js/main.js | 16 |
1 files changed, 7 insertions, 9 deletions
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); })($); |