Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sillytavern/extension-coderunner
Allows running JavaScript code from code blocks in chat.
https://github.com/sillytavern/extension-coderunner
extension
Last synced: about 5 hours ago
JSON representation
Allows running JavaScript code from code blocks in chat.
- Host: GitHub
- URL: https://github.com/sillytavern/extension-coderunner
- Owner: SillyTavern
- License: agpl-3.0
- Created: 2024-03-21T22:27:04.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-16T20:18:25.000Z (6 months ago)
- Last Synced: 2024-05-16T21:31:22.436Z (6 months ago)
- Topics: extension
- Language: JavaScript
- Homepage:
- Size: 145 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Code Runner
This extension allows running JavaScript and STscript code from code blocks in chat.
If you can't see an execution button, edit the codeblock and specify the language manually after the opening triple backticks.
## For JavaScript
> \`\`\` => \`\`\`js
Calls to `console` and `alert` are redirected to the output block below the code.
To display anything in the final result, use `return` as the last statement.
## For STscript
> \`\`\` => \`\`\`stscript
To display anything in the final result, use any command that writes to the pipe as the last statement.
## Security
The execution is sandboxed using [SandboxJS](https://github.com/nyariv/SandboxJS), but please don't run anything that looks too sussy.