Custom JS Scripting

Created by josh
July 26, 2020 10:50:42 PM PDT


The javascript functionality for Gaseous are mostly composed of built-in JS from the codebase with additions as seen in the JS Script Management admin panel (/admin/js/). The installation of Gaseous introduced some default scripting, which is rendered after the scripts from the codebase.

In the Settings Management panel (/admin/settings/), the output of the JS can be inline or output as a compressed and minified file with the option titled "Output JS iterator content in HTML script tag". To toggle this setting, the user must be able to edit settings.

The JS admin panel provides workflows to preview previous iterations, preview current changes, revert to a previous iteration, and create a new iteration (either by loading a previous iteration into the editor, or creating a whole new set of script functionality). When a new iteration is created, an optional commit message can be saved with it to provide a summary of what the changes include.

When the preview functionality is being used, a persistent notification is displayed in the bottom, right corner of the page.

To edit JS within the application, a user must be associated with a role with Manage JS enabled.