jailed icon indicating copy to clipboard operation
jailed copied to clipboard

Write code without application.remote

Open vBoykoGit opened this issue 6 years ago • 2 comments

How can I write clean code without 'application.remote.'? I don't want write like that: var code = "application.remote.alert('Hello from the plugin!');"; I need this clean code: var code = "alert('Hello from the plugin!');"; So can i write wihtout 'application.remote.' or can i add it in runtime?

vBoykoGit avatar Jan 13 '19 04:01 vBoykoGit

interested in this one too

alijaya avatar Aug 30 '20 20:08 alijaya

I just use this one quick hack... just add this to the plugin code

for (const props in application.remote) {
  eval(`var ${props} = application.remote.${props}`)
}

alijaya avatar Aug 30 '20 21:08 alijaya