diff --git a/public/script.js b/public/script.js index cad2f20ed..d9fafc7e5 100644 --- a/public/script.js +++ b/public/script.js @@ -9151,7 +9151,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(); } @@ -9299,7 +9299,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(); } diff --git a/public/scripts/st-context.js b/public/scripts/st-context.js index 0ba1104bd..dce502bea 100644 --- a/public/scripts/st-context.js +++ b/public/scripts/st-context.js @@ -50,6 +50,8 @@ import { unshallowCharacter, deleteLastMessage, getCharacterCardFields, + swipe_right, + swipe_left, } from '../script.js'; import { extension_settings, @@ -196,6 +198,7 @@ export function getContext() { humanizedDateTime, updateMessageBlock, appendMediaToMessage, + swipe: { left: swipe_left, right: swipe_right }, variables: { local: { get: getLocalVariable,