You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tip: "The following variables are available:\n- `eventName` (the name of the received event: `show`, `settings-update`, `state-update`, `message`, `remove`)\n- `widgetId` (this widget's unique ID)\n- `widgetState` (the current state of the widget, if any)\n- `messageName` (the name of the received message, if event is 'message')\n- `messageData` (the data sent with the message, if any and if event is 'message')\n- `overlayWrapperElement` (the official root element of the overlay, it's recommended to use this for DOM manipulations)\n- `utils.stylesToString(styles)` (utility function to convert a styles object to an inline css string)",
40
+
tip:
41
+
`The following variables are available:
42
+
- \`eventName\` (the name of the received event: \`show\`, \`settings-update\`, \`state-update\`, \`message\`, \`remove\`)
43
+
- \`widgetId\` (this widget's unique ID)
44
+
- \`widgetState\` (the current state of the widget, if any)
45
+
- \`messageName\` (the name of the received message, if event is 'message')
46
+
- \`messageData\` (the data sent with the message, if any and if event is 'message')
47
+
- \`overlayWrapperElement\` (the official root element of the overlay, it's recommended to use this for DOM manipulations)
48
+
- \`utils.stylesToString(styles)\` (utility function to convert a styles object to an inline css string)
49
+
- \`utils.sendMessageToFirebot(messageName: string, messageData?: any)\` (utility function to send a message back to Firebot)`,
description: "Optional code that runs when the widget is shown. Ran in an async function (await is supported).",
37
-
default: `// Example: Change the text color of the widget's\n// content to red\ncontainerElement\n. .querySelector('#my-widget')\n. .style.color = 'red';`,
38
-
tip: "The following variables are available:\n- `containerElement` (the root HTML element of the widget)\n- `widgetId` (this widget's unique ID)\n- `widgetState` (the current state of the widget, if any)",
38
+
default: `// Example: Change the text color of the widget's\n// content to red\ncontainerElement\n .querySelector('#my-widget')\n .style.color = 'red';`,
39
+
tip:
40
+
`The following variables are available:
41
+
- \`containerElement\` (the root HTML element of the widget)
42
+
- \`widgetId\` (this widget's unique ID)
43
+
- \`widgetState\` (the current state of the widget, if any)
44
+
- \`utils.sendMessageToFirebot(messageName: string, messageData?: any)\` (utility function to send a message back to Firebot)`,
description: "Optional code that runs when the widget's state is updated via the Update Custom Widget State effect. Ran in an async function (await is supported).",
52
58
default: ``,
53
-
tip: "The following variables are available:\n- `containerElement` (the root HTML element of the widget)\n- `widgetId` (this widget's unique ID)\n- `widgetState` (the current state of the widget, if any)",
59
+
tip:
60
+
`The following variables are available:
61
+
- \`containerElement\` (the root HTML element of the widget)
62
+
- \`widgetId\` (this widget's unique ID)
63
+
- \`widgetState\` (the current state of the widget, if any)
64
+
- \`utils.sendMessageToFirebot(messageName: string, messageData?: any)\` (utility function to send a message back to Firebot)`,
description: "Optional code that runs when the widget receives a message from the Send Message To Custom Widget effect. Ran in an async function (await is supported).",
67
78
default: ``,
68
-
tip: "The following variables are available:\n- `containerElement` (the root HTML element of the widget)\n- `widgetId` (this widget's unique ID)\n- `widgetState` (the current state of the widget, if any)\n- `messageName` (the name of the received message)\n- `messageData` (the data sent with the message, if any)",
79
+
tip:
80
+
`The following variables are available:
81
+
- \`containerElement\` (the root HTML element of the widget)
82
+
- \`widgetId\` (this widget's unique ID)
83
+
- \`widgetState\` (the current state of the widget, if any)
84
+
- \`messageName\` (the name of the received message)
85
+
- \`messageData\` (the data sent with the message, if any)
86
+
- \`utils.sendMessageToFirebot(messageName: string, messageData?: any)\` (utility function to send a message back to Firebot)`,
0 commit comments