From edabb1d97f8a12fc1b12673ed32a3871708aa180 Mon Sep 17 00:00:00 2001 From: FongMi Date: Sun, 10 May 2026 04:48:20 +0800 Subject: [PATCH] Add enter detect for html --- app/src/main/assets/js/script.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/assets/js/script.js b/app/src/main/assets/js/script.js index aa17a3a03..2b8f33be3 100644 --- a/app/src/main/assets/js/script.js +++ b/app/src/main/assets/js/script.js @@ -278,3 +278,11 @@ window.addEventListener('popstate', function () { if (visible.length) { visible.first().hide(); return; } listFile(currentParent); }); + +$(function () { + $('#keyword').on('keydown', function (e) { if (e.key === 'Enter') search(); }); + $('#push_url').on('keydown', function (e) { if (e.key === 'Enter') push(); }); + $('#danmaku_text').on('keydown', function (e) { if (e.key === 'Enter') sendDanmaku(); }); + $('#setting_name, #setting_text').on('keydown', function (e) { if (e.key === 'Enter') setting(); }); + $('#newFolderContent').on('keydown', function (e) { if (e.key === 'Enter') confirmNewFolder(1); }); +});