diff --git a/public/script.js b/public/script.js index 943bb7cc4..30f90bb74 100644 --- a/public/script.js +++ b/public/script.js @@ -1685,11 +1685,14 @@ function substituteParams(content, _name1, _name2, _original, _group) { content = content.replace(//gi, _group); content = content.replace(//gi, _group); + content = content.replace(/\{\{\/\/(.*?)\}\}/g, ""); + content = content.replace(/{{time}}/gi, moment().format('LT')); content = content.replace(/{{date}}/gi, moment().format('LL')); content = content.replace(/{{weekday}}/gi, moment().format('dddd')); content = content.replace(/{{isotime}}/gi, moment().format('HH:mm')); content = content.replace(/{{isodate}}/gi, moment().format('YYYY-MM-DD')); + content = content.replace(/{{datetimeformat +([^}]*)}}/gi, (_, format) => { const formattedTime = moment().format(format); return formattedTime; diff --git a/public/scripts/templates/macros.html b/public/scripts/templates/macros.html index 1a3751ba1..007861308 100644 --- a/public/scripts/templates/macros.html +++ b/public/scripts/templates/macros.html @@ -3,6 +3,7 @@ System-wide Replacement Macros:
  • {{user}} - your current Persona username
  • {{char}} - the Character's name
  • {{input}} - the user input
  • +
  • {{// (note)}} - you can leave a note here, and the macro will be replaced with blank content
  • {{time}} - the current time
  • {{date}} - the current date
  • {{weekday}} - the current weekday