i have created a chrome extension. now, i want to change it to a NPAPI plugin. i have used npsimple sample code(from chrome) to build plugin. now the issue is:
i have following java script chrome extension file code:
//test.js
chrome.browserAction.onClicked.addListener(function(tab)
{
//this file calls content script file
});
this file is called when ever i click on extension icon. now we don't want to call this file by clicking on extension(want to call it when plugin is loaded). so we can have some other event also. now i have to call test.js file from NPAPI plugin.i have no idea how can i do that. can we fire some fake event from NPAPI plugin inside NPN_INVOKE and register a listener in js file and execute js file. or is there any way to inject this file in NPAPI code.
is there any other better way..
please help.. thanks in advance...