chrome 扩展 插件

作者: littlesu 分类: chrome 发布时间: 2013-01-16 15:37 ė18,416 浏览数 68条评论
 chrome 有2种扩展 1.Browser Action; actions


{If you want to create an icon that isn't always visible, use a page action instead of a browser action. }
Browser Plugins vs Extensions – the difference
An extension could contain a plugin, but a plugin can’t contain an extension
google Browser extension framework
一个Chrme扩展是由HTML、CSS、JavaScript、图片等文件压缩而成。扩展实际上就是一个web页面,可以用任何浏览器提供给web页面的接口,从XMLHttpRequest 到JSON ,再到HTML本地缓存都可以使用。
每个扩展是 一个.crx文件(类似zip的 压缩文件),由下列文件组成
JavaScript文件 (可选,非必须)
读取用户计算机数据(NPAPI Plugins





Background page 和 PopUp  page

 var global_email = "";
 var bgpg = chrome.extension.getBackgroundPage();
bgpg.global_email = "";


分析 插件
manifest.json 主文件 Formats: Manifest Files 

NPAPI Plugins


 How to develop an NPAPI plugin is outside the scope of this document. See Mozilla's NPAPI plugin reference for information on how to do that.
  1. Add a section to your extension's manifest.json that describes where to find the plugin, along with other properties about it:


    The "path" property specifies the path to your plugin, relative to the manifest file. The "public" property specifies whether your plugin can be accessed by regular web pages; the default is false, meaning only your extension can load the plugin.

  2. Create an HTML file that loads your plugin by mime-type. Assuming your mime-type is "application/x-my-extension":


    This can be inside a background page or any other HTML page used by your extension. If your plugin is "public", you can even use a content script to programmatically insert your plugin into a web page.
    下一步封装库 fun(currentUrl);
    顺便看到个这个 LomoX常见问题
    qt plugin 

只回答业务咨询点击这里给我发消息 点击这里给我发消息


本文出自 王牌软件,转载时请注明出处及相应链接。




  1. Darin 2013 年 2 月 9 日 下午 11:54 回复

    Thanks on your marvelous posting! I definitely enjoyed reading
    it, you can be a great author.I will make sure to bookmark your
    blog and will eventually come back in the foreseeable future.
    I want to encourage you continue your great work, have a nice holiday

  2. download far cry 3 2013 年 2 月 11 日 上午 8:06 回复

    At this time I am going to do my breakfast, when having my breakfast coming yet again to read further news.

  3. starcraft 2 heart of the swarm 2013 年 2 月 11 日 上午 8:23 回复

    Hi there, after reading this remarkable piece of writing i
    am as well delighted to share my experience here
    with friends.

  4. cheap viagra 2013 年 2 月 11 日 下午 1:10 回复

    Whаt’s up, I log on to your new stuff on a regular basis. Your humoristic style is awesome, keep it up!

    admin 回复:

    thank you

  5. 2013 年 2 月 14 日 上午 9:28 回复

    I simply couldn’t go away your website prior to suggesting that I really enjoyed the standard information a person provide for your guests? Is going to be again frequently in order to check out new posts

  6. starcraft 2 heart of the swarm 2013 年 2 月 17 日 上午 11:30 回复

    Hmm is anyone else experiencing problems with the
    images on this blog loading? I’m trying to figure out if its a problem on my end or if it’s the blog.
    Any feedback would be greatly appreciated.

  7. pirater whatsapp 2013 年 4 月 13 日 下午 2:24 回复

    It is really a nice and useful piece of info. I am glad that you
    simply shared this useful info with us. Please keep us
    up to date like this. Thanks for sharing.

pirater whatsapp进行回复 取消回复

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">