速快制作一个chrome-extension例子

chrome-extension项目目录的结构如下:

新建一个manifest.json文件

```json manifest.json { "manifest_version": 2, "name": "growcn", "description": "blog growcn", "version": "1.0", "icons": { "128": "icon_128.png" }, "app": { "urls": [ "http://blog.growcn.com" ], "launch": { "web_url": "http://blog.growcn.com" } }, "permissions": [ "unlimitedStorage", "notifications" ] }

<!--more-->

###加入一张128*128的icon图片
如:
![](/images/uploads/chrome_icon_128.png)


###导入该项目到chrome中

中chrome的地址栏中输入[chrome://extensions/](chrome://extensions/)

![](/images/uploads/chrome_0821E82D-1E65-4368-BCF1-0A870F01F687.jpg)



###在chrome的extensions将会看到导入的项目

![](/images/uploads/chrome_DB803D31-B180-4862-A912-3136EBCF1CBB.jpg)



###最终效果:

![](/images/uploads/chrome_3D3D48AC-672A-420D-A445-A807245B0FCE.jpg)

点击就可以打开自己的[博客](http://blog.growcn.com)了!


后续添加一个实用的例子。


ref:[https://developer.chrome.com/extensions/index.html](https://developer.chrome.com/extensions/index.html)

Comments