.js file as Plug-in

[email protected] Sun, 23 Feb 2014 04:03:38 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
Hi, 
  I have a .js file which adds annotations to the PDF file that is rendered on the browser.

I don't know how to use the .js file as a plug-in. Now I know how to include that file in <script> tags in the webpage but thats not i want.

I want to be able to install the file as anyother plug-in. 

As soon as PDF is rendered the browser should invoke my .js file. How to do it??

Some one please provide me an insight.