SugarCube JavaScript#
The SugarCube documentation provides details for using Scripting Macros with JavaScript code. It also provides multiple application programming interfaces (APIs) for using JavaScript with its own built-in functionality.
window.setup
#
When working with Story JavaScript, it is strongly recommended, to use the setup object in SugarCube to add functionality.
window.setup = window.setup || {};
SugarCube Addons#
Working with SugarCube Addons requires using Story JavaScript. The provided instructions with the addon often require copying and pasting code into this area or configuring other options.