Skip to main content

Introduction

Clientside trigger handler

add = ({
regex,
action,
id = crypto.randomUUID(),
enabled = true,
once = false,
duration = false,
fg = false,
bg = false,
lines = 0,
tags = [],
onRemove,
onDisable,
onEnable,
})
NameTypeDefaultDescription
regexregexRequiredRegex pattern to match
actionfunctionRequiredCallback function to fire when event is raised.
idstringguidid used for enabling/disabling/deleting
enabledbooleantrueEnabled or disabled state of the action
oncebooleanfalseListener will fire once and be removed (single fire).
durationmilisecondsOptionalDuration for action to remain active (single fire).
fghexOptionalForeground color to match in form of hex color code
bghexOptionalBackground color to match in form of hex color code
linesintOptionalNumber of lines for action to remain active
tagsstring arrayOptionalString identifiers for filtering and searching
onRemovefunctionOptionalCallback function to fire when action is removed
onDisablefunctionOptionalCallback function to fire when action is disabled
onEnablefunctionOptionalCallback function to fire when action is enabled