Creating scripts
Last updated
Last updated
To create a script or JavaScript file, go to the plugin's script folder (plugins/OpenJS/scripts
), create a .js
file (e.g., file.js
), and start coding. I recommend using a code editor like Notepad++ or Visual Studio Code. Make sure your script is loaded and enabled, if you're not sure how to check this, refer to the section.
As the file type suggests, scripts are written in JavaScript (specifically ) While this version of JavaScript is somewhat outdated, it's very simple and easy to use.
Here’s an example script that will log 'Hello World!' to your console:
Many modern JavaScript features (such as let
, const
, arrow functions, classes, promises, modules, etc.) are either not fully supported or completely missing in ECMAScript 5.1