From a310c03082662e4efbf38abdb1e1970d5a5abc25 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Tue, 2 May 2023 23:04:42 +0900 Subject: [PATCH] lastInContext highlight skips swipeBox on swipeGen --- public/script.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 8c68278af..f99f29d65 100644 --- a/public/script.js +++ b/public/script.js @@ -1725,9 +1725,15 @@ async function Generate(type, automatic_trigger, force_name2) { } else { $("#chat").children().removeClass('lastInContext'); - console.log(arrMes.length); - $(`#chat .mes:nth-last-child(${arrMes.length} of :not([is_system="true"])`).addClass('lastInContext'); + let lastmsg = arrMes.length; + + if (type === 'swipe') { + lastmsg++; + } + //console.log(arrMes.length); + //console.log(lastmsg); + $(`#chat .mes:nth-last-child(${lastmsg} of :not([is_system="true"])`).addClass('lastInContext'); break; }