JavaScript Snippets Plugin

This experimental Plugin project supports the addition of JavaScript snippets which can be enabled and disabled individually in the plugin’s settings.

Just the one use case currently - stripping leading and trailing whitespace from the instance name field in the Morpheus UI standard persona.

The plugin only runs JavaScript included as part of the JAR build. It is possible to read from a remote URL and maintain the JavaScript outside of the plugin, by referencing and including a remote script, but with the approach here, each snippet which comprises the JavaScript payload can be enabled/disabled in the plugin settings.

i.e If you don’t want to strip whitespace in your instance names, you simply do not enable it in the settings.

The plugin could be extended to do much more, but this is an example plugin project intended to help community members approach and get started with plugin development.

That said, if you have suggestions and ideas please post up. If you want to contribute directly via pull request, then please do :+1:

Plugin repository:

Tested on Morpheus 6.1.0