Execute Init Function Externally

javascript

#1

Is there a way to execute an init function from an external js file?

services.commands.addCommand({
    name: "oneplusone",
    exec: function(){ 
        services["dialog.alert"].show("Welcome!", 
    "Welcome to Cloud9", 
    "I hope you have a great day today!");
    },
}, plugin);

is there anyway to call services.command.exec('oneplusone'); from any random js file?


#2

I don’t quite understand what do you want to do here.
How do you load that random js file?