搜索
您的当前位置:首页正文

chrome浏览器插件开发入门例子

来源:二三娱乐

以上定义browser action时候,我们加了两个name/value pair,: icon.png 和 popup.html, 这两个文件必须也在项目目录下

icon.png是那个会出现在地址栏右侧的插件图标,它是个19px-square PNG file

现在来试试看把这些文件载入chrome

you can drag and drop the directory where your extension files live onto chrome://extensions in your browser to load it.

拨弄您的代码:

让我们来为图标加一个提示信息,

"browser_action":

{...

"default_title":"Click here!"

}

manifest文件只在插件被加载时候才被解析,如果你想看到改变代码以后的变化,就需要重载 extension: Visit the extensions page (go to chrome://extensions), and click Reload under your extension.  当您在chrome://extensions/这个页面按下Ctrl+R时候,所有的插件也都会被重载

Top