MMM-Fuel.js
/**
     * @function start
     * @description Appends Google Map script to the body, if the config option map_api_key is defined. Calls
     * createInterval and sends the config to the node_helper.
     * @override
     */
@function start
@description Appends Google Map script to the body, if the config option map_api_key is defined. Calls
createInterval and sends the config to the node_helper.
@override
@function start @description Appends Google Map script to the body if the config option map_api_key is defined . Calls createInterval and sends the config to the node_helper . @override
start() {
        Log.info(`Starting module: ${this.name}`);
        this.addGlobals();
        this.addFilters();
        if (this.config.map_api_key) {
            const script = document.createElement('script');
            script.src = `https://maps.googleapis.com/maps/api/js?key=${this.config.map_api_key}`;
            document.querySelector('body').appendChild(script);
        }
        this.interval = this.createInterval();
        this.sendSocketNotification('CONFIG', this.config);
    }
start ( ) { Log . info ( ` ${ this . name } ` ) ; this . addGlobals ( ) ; this . addFilters ( ) ; if ( this . config . map_api_key ) { const script = document . createElement ( 'script' ) ; script . src = ` ${ this . config . map_api_key } ` ; document . querySelector ( 'body' ) . appendChild ( script ) ; } this . interval = this . createInterval ( ) ; this . sendSocketNotification ( 'CONFIG' , this . config ) ; }
@function start
 @description Appends Google Map script to the body, if the config option map_api_key is defined.
@function start @description Appends Google Map script to the body if the config option map_api_key is defined .
// Add script manually, getScripts doesn't work for it!