From 9c79b03b6f8d0259d9f9d0a4be46bb24c315fa6f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 22 May 2021 10:02:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lanzou-Enhanced.user.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Lanzou-Enhanced.user.js b/Lanzou-Enhanced.user.js index e05f907..c95f5d8 100644 --- a/Lanzou-Enhanced.user.js +++ b/Lanzou-Enhanced.user.js @@ -153,9 +153,7 @@ function refreshCorrection() { document.onkeydown = mainframe.onkeydown = function (e) { e = window.event || e; - let keycode = e.keyCode; - if (keycode == 116) { - e.keyCode = 0; + if (e.key === 'F5') { let folderID = /-?\d+/.exec(mainframe.document.getElementById("filemore").children[0].getAttribute("onclick")) if(folderID.length > 0){ mainframe.folder(folderID[0]); @@ -172,8 +170,7 @@ function UNrefreshCorrection() { document.onkeydown = mainframe.onkeydown = function (e) { e = window.event || e; - let keycode = e.keyCode; - if (keycode == 116) { + if (e.key === 'F5') { return true; } }