Search code examples
pluginsbrowsernpapi

Can NPAPI plugins execute on every page?


I wanted to build an extension but realized a plugin would give me more control to do the things I want. Can you build NPAPI plugins that are called on every page the user loads like an extension is, or are they limit to the MIME type to you specify in the plugins manifest file?


Solution

  • Plugins are only instantiated to handle their defined MIME types. If you wanted a plugin to run on every page, you'd have to make an extension that injected an instance of your plugin into the DOM of every page.