Search code examples
google-chromegoogle-chrome-extensionexecutablenpapi

Chrome Extension: Save file and start and external application


I need to develop a cross-platform Google Chrome extension that takes the inner HTML of the current page and saves it to the hard drive, and then launches an application that would process that file.

Is there any way to do this?

I've looked at the NPAPI, but does it require that I create a .DLL? If so, that doesn't seem like it would easily be portable to other operating systems.


Solution

  • To launch an application, you can only use NPAPI.

    NPAPI is available in all operating systems (Linux - so, Mac - plugin, Windows - dll). If you want to make your Chrome Extension cross platform, you would need to write a NPAPI plugin for each operating system.

    In your manifest you define them all inside, when the extension loads, it will scan the plugin array in your manifest one at a time, and only loads the ones that is for your system.

    www.firebreath.org is a cross platform plugin framework.