Thingworx Load Monaco Editor

Loads the monaco editor in the new composer from CDN.

// ==UserScript==
// @name         Thingworx Load Monaco Editor
// @namespace    https://github.com/ptc-iot-sharing/MonacoEditorTWX
// @version      0.3
// @description  Loads the monaco editor in the new composer from CDN.
// @author       Petrisor Lacatus
// @match         *://*/Thingworx/Composer/*
// @match         *://*/Thingworx/Builder/*
// @grant        none
// ==/UserScript==

const TWX_MONACO_VERSION = 'latest';

var script = document.createElement("script");
script.src = `https://cdn.jsdelivr.net/npm/@placatus/twx-monaco-editor@${TWX_MONACO_VERSION}/build/ui/MonacoScriptEditor/newComposer.bundle.js`;
script.charset = "UTF-8";
document.getElementsByTagName("head")[0].appendChild(script);