From 27f2fac916d5c709e8ae5ecc0f578b8f0a8d8f4e Mon Sep 17 00:00:00 2001 From: Samueras Date: Sun, 4 May 2025 11:59:17 +0200 Subject: [PATCH 1/6] Export swipe_right in public/script.js and add swipe_right to getContext in st-context.js --- public/scripts/st-context.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/scripts/st-context.js b/public/scripts/st-context.js index 0ba1104bd..ebf4b5378 100644 --- a/public/scripts/st-context.js +++ b/public/scripts/st-context.js @@ -50,6 +50,7 @@ import { unshallowCharacter, deleteLastMessage, getCharacterCardFields, + swipe_right, } from '../script.js'; import { extension_settings, @@ -196,6 +197,7 @@ export function getContext() { humanizedDateTime, updateMessageBlock, appendMediaToMessage, + swipe_right, variables: { local: { get: getLocalVariable, From 5f79c0c26220ced26be21576e4331bf5e3350c93 Mon Sep 17 00:00:00 2001 From: Samueras Date: Sun, 4 May 2025 12:05:45 +0200 Subject: [PATCH 2/6] Export swipe_right in public/script.js --- public/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/script.js b/public/script.js index f2efda2b5..c1b65e24e 100644 --- a/public/script.js +++ b/public/script.js @@ -293,6 +293,7 @@ export { isOdd, countOccurrences, renderTemplate, + swipe_right }; /** From 3165537ce878721d15adf42d10bdecd13b4597a1 Mon Sep 17 00:00:00 2001 From: Samueras Date: Sun, 4 May 2025 12:12:50 +0200 Subject: [PATCH 3/6] Update script.js Added trailing comma --- public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index c1b65e24e..9f948bb32 100644 --- a/public/script.js +++ b/public/script.js @@ -293,7 +293,7 @@ export { isOdd, countOccurrences, renderTemplate, - swipe_right + swipe_right, }; /** From 99f47de88b7f86b14ed880add5bb766a4db70ed1 Mon Sep 17 00:00:00 2001 From: Samueras Date: Sun, 4 May 2025 18:15:28 +0200 Subject: [PATCH 4/6] Export Swipe left and right Exporting the swipe_left and the swipe_right functions --- public/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 9f948bb32..c75d52e9c 100644 --- a/public/script.js +++ b/public/script.js @@ -9105,7 +9105,7 @@ function formatSwipeCounter(current, total) { * @param {string} [params.source] The source of the swipe event. * @param {boolean} [params.repeated] Is the swipe event repeated. */ -function swipe_left(_event, { source, repeated } = {}) { +export function swipe_left(_event, { source, repeated } = {}) { if (chat.length - 1 === Number(this_edit_mes_id)) { closeMessageEditor(); } @@ -9253,7 +9253,7 @@ function swipe_left(_event, { source, repeated } = {}) { * @param {string} [params.source] The source of the swipe event. * @param {boolean} [params.repeated] Is the swipe event repeated. */ -function swipe_right(_event, { source, repeated } = {}) { +export function swipe_right(_event, { source, repeated } = {}) { if (chat.length - 1 === Number(this_edit_mes_id)) { closeMessageEditor(); } From f0fbd7e3d4003c192822f89f55989a0e821676fb Mon Sep 17 00:00:00 2001 From: Samueras Date: Sun, 4 May 2025 18:17:44 +0200 Subject: [PATCH 5/6] added swipe left and right to st-context Added swipe_right and swipe_left to st-context as a swipe group. --- public/scripts/st-context.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts/st-context.js b/public/scripts/st-context.js index ebf4b5378..dce502bea 100644 --- a/public/scripts/st-context.js +++ b/public/scripts/st-context.js @@ -51,6 +51,7 @@ import { deleteLastMessage, getCharacterCardFields, swipe_right, + swipe_left, } from '../script.js'; import { extension_settings, @@ -197,7 +198,7 @@ export function getContext() { humanizedDateTime, updateMessageBlock, appendMediaToMessage, - swipe_right, + swipe: { left: swipe_left, right: swipe_right }, variables: { local: { get: getLocalVariable, From 3db2db1c657d1a75ed4d8a61923cc5e82f9c198a Mon Sep 17 00:00:00 2001 From: Samueras Date: Sun, 4 May 2025 18:20:40 +0200 Subject: [PATCH 6/6] Removed Swipe_right from legacy export Removed Swipe_right from legacy export --- public/script.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/script.js b/public/script.js index c75d52e9c..0e5c3cd8c 100644 --- a/public/script.js +++ b/public/script.js @@ -293,7 +293,6 @@ export { isOdd, countOccurrences, renderTemplate, - swipe_right, }; /**