Developing Chrome Extensions Using NPAPI in C++

后端 未结 2 1184
太阳男子
太阳男子 2021-02-04 19:35

I want to develop a simple Chrome extension in C++, using NPAPI, which does the job of dumping the HTML content of the current page onto a file. I don\'t have much expertise in

2条回答
  •  离开以前
    2021-02-04 20:23

    1 - Create a Extension... http://code.google.com/chrome/extensions/getstarted.html

    2 - Create a NPAPI plugin... http://colonelpanic.net/2009/03/building-a-firefox-plugin-part-one/

    3 - On the manifest of your extension add the plugin...

    "plugins": [
        { "path": "your_npapi_plugin.dll" }    
      ],
    

    4 - On your extension background page create the plugin

    
    

    5 - Create a javascript that you will use as a content script injected on every page. On that script communicate with your npapi scriptable object and do the work you want to do.


    How do I get the value of MyNPAPIPluginId? All I have is the name of the DLL?

    On your background page when you add the tag of your plugin, you place the id

    
    

    On Windows you add the MIMEType on the resource file of the DLL, add a entry with:

    VALUE "MIMEType", "application/my-plugin-mimetype"
    

提交回复
热议问题