From 9f38c081d9cfeeb384a01ecce70b4d1ca2d334bc Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Tue, 28 Nov 2023 22:02:09 +0530 Subject: [PATCH] (feat): added ALT + L keyboard shotcut for share window --- htdocs/assets/js/floatingbar-config.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/assets/js/floatingbar-config.js b/htdocs/assets/js/floatingbar-config.js index 79b954a..e34d15f 100644 --- a/htdocs/assets/js/floatingbar-config.js +++ b/htdocs/assets/js/floatingbar-config.js @@ -90,6 +90,7 @@ closeBtn.addEventListener("click", function () { document.addEventListener("keydown", function(event) { if (event.key === "Escape") { close_search(); + close_share(); } }); @@ -342,6 +343,13 @@ shareCloseBtn.addEventListener("click", function () { close_share(); }); +// when ALT + L shortcut key is pressed +document.addEventListener("keydown", function(event) { + if (event.altKey && event.key === "l") { + activate_share(); + } +}); + // function to share with webShareAPI (Native OS Share) function call_webshare_api() { if(navigator.share) {