Posts Tagged ‘chrome’

Chrome Updates

Maxthon for Mac is based on Chromium 21.0.1180.75.
And now we are planning to upgrade to Chromium 25.0.1364.99.
Let’s look at what they have improved.

25.0.1364.99
  • Improvements in managing and securing your extensions
  • Better support for HTML5 time/date inputs
  • JavaScript Web Speech API support
  • Better WebGL error handling
  • And lots of other features for developers

阅读全文 »

如何制作chrome扩展程序

简单实现了一个 chrome 的扩展,方法如下:
首先新建一个文件夹,用编辑器写一个文件名为 manifest.json 的文件:

{
  "name": "抓猫!",
  "version": "1.0",
  "description": "你能抓住她吗?",
  "browser_action": {
  "default_icon": "icons/icon_19.png",
  "popup": "files/game.html"
  },
  "icons": {
    "16": "icons/icon_16.png",
    "19": "icons/icon_19.png",
    "32": "icons/icon_32.png",
    "48": "icons/icon_48.png",
    "128": "icons/icon_128.png"
  }
}

这其中,如果需要多语言支持的话,可以添加default_locale,并将name&description字段修改为:

{
  "name": "__MSG_name__",
  "description": "__MSG_description__",
  "default_locale": "zh_CN"
}

并在插件目录下添加 _locales 目录,内置语言文件,如图所示:

这其中 messages.json 内容如下:

{
  "name": {"message": "Catch Cat!"},
  "description": {"message": "Can you catch it ?"}
}

插件主程序完成后,直接编写插件所调用的html就可以了 “popup”: “files/game.html”
调试时,可以勾选chrome浏览器扩展程序里面的“开发人员模式”,载入正在开发的扩展程序即可。

开发完成后,使用浏览器打包扩展程序,就可以发给朋友们玩了。欢迎下载体验:
http://uicss.cn/test/catch-cat.crx

崔凯博客
Powered by SinaSAE | Theme by ck web design | TOP 顶部
Copyright © 崔凯 All rights reserved. 蜀ICP备12025891号.