You are not logged in.

1

Sunday, April 23rd 2017, 8:46pm

get the xml plugin name in the plugins js code?

hi klaus,

is it possible for a plugin to get its own name?

i mean if you init the plugin with:

<plugin name="mySuperPlug" url="plugins/myPlugin.js" keep="true" />

can you get "mySuperPlug" somehow in the plugins js code?

best,
index

2

Monday, April 24th 2017, 12:59am

darn... i found it already:

pluginpath here:

local.registerplugin = function(krpanointerface, pluginpath, pluginobject)
{...}

3

Monday, April 24th 2017, 6:38pm

Hi,

'pluginpath' contains a name like 'plugin[mySuperPlug]', for getting only the name just use 'pluginobject.name' (or later when the global 'plugin' variable was assigned to that object - 'plugin.name').

Best regards,
Klaus