From 4c70d124dabf5963d07aad17684ee4de6dfe4bf0 Mon Sep 17 00:00:00 2001 From: anosanstudio Date: Wed, 10 Nov 2021 00:32:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=87Kkeyfunction=E8=B7=9FLkeyfunction?= =?UTF-8?q?=E7=9A=84reactTime=E5=8F=83=E6=95=B8=E9=A0=90=E8=A8=AD=E7=82=BA?= =?UTF-8?q?0=EF=BC=8C=E6=96=B9=E4=BE=BF=E4=BB=A5=E5=BE=8C=E5=91=BC?= =?UTF-8?q?=E5=8F=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index c7a66c0..e25eb89 100644 --- a/main.js +++ b/main.js @@ -260,7 +260,7 @@ function MakeSub(SubSequence) { } } -function Kkeyfunction(video, reactTime) { +function Kkeyfunction(video, reactTime = 0) { if (currentStamping >= lines.length) { return; } @@ -275,7 +275,7 @@ function Kkeyfunction(video, reactTime) { currentStamping += 1; } -function Lkeyfunction(video, reactTime) { +function Lkeyfunction(video, reactTime = 0) { lines[currentStamping] = [ lines[currentStamping][0], video.currentTime - reactTime @@ -309,7 +309,7 @@ document.getElementById("subtainer").addEventListener('mousedown', function (e) GetnewWidth(); currentStamping = (Number(SubSequence) - 1); video.currentTime = (SubWidth[SubSequence] - newWidth + SubLeft[SubSequence]) / pxPerSec; - Kkeyfunction(video, 0); + Kkeyfunction(video); updateContent(); } } @@ -329,7 +329,7 @@ document.getElementById("subtainer").addEventListener('mousedown', function (e) GetnewWidth(); currentStamping = Number(SubSequence); video.currentTime = (newWidth + SubLeft[SubSequence]) / pxPerSec; - Lkeyfunction(video, 0); + Lkeyfunction(video); updateContent(); } }