首页 > Google App Engine, Programmer > Google Chrome Extension 4 PRONLINE

Google Chrome Extension 4 PRONLINE

用Google Gadgets API为Pattern Recognition Online写了一个iGoogle的小工具, 代码部分很简单就是加载swf文件, 服务器用的还是GAE. 下面给出了添加到iGoogle的链接, 默认窗口比较小, 最大化之后可显示完整界面.

<?xmlversion="1.0" encoding=”UTF-8″ ?>
<Module>
<ModulePrefs title="Pattern Recognition Online" width="407" height="460" scrolling="false">
  <Require feature="flash" />
  </ModulePrefs>
<Content type="html">
<![CDATA[

<div id="flashcontainer" style="text-align: center;"></div>

<script type="text/javascript">
 
  function showFlash() {

    var url = "http://219.223.240.153/lihao/wp-application/pronline/PatternRecognitionOnline.swf";

    // Play .swf file.
    _IG_EmbedFlash(url, "flashcontainer", {
      swf_version: 6,
      id: "flashid",
      width: 407,
      height: 460
    })
  }

  // When gadget first loads, display flash.
  _IG_RegisterOnloadHandler(showFlash);
  </script>
  ]]>
</Content>
</Module>

My gadget is located here. Would like to:

之前使用过迷你人人Chrome插件, 相当于一个轻量级的人人桌面, 很不错的一个应用, 一度挺佩服这个插件的作者的, 但当自己也尝试着写完一个Google Chrome Extension之后, 才发现插件的作者其实什么也没做, 因为他只不过把人人网迷你版的代码嵌入进来了而已, 而这个东西是人人网和Google联合开发的一个iGoogle小工具.

为Pattern Recognition Online系统写的Chrome扩展: ChromeExPro. Chrome扩展的编写也很简单, 就是几个配置文件, 可参见Chrome扩展入门教程HelloWorld. 提交的插件是一个zip压缩文件, 里面的目录结构如下:

icon.png: 19×19像素大小的图标.

manifest.json: Google Chrome Extension配置文件.


{
"name": "Chrome Extension Pro",
"version": "1.0",
"description": "Pattern Recognition Online",
"browser_action": {
"default_icon": "icon.png",
"popup": "popup.html"
}
}

popup.html: iframe里的html, 本扩展使用上文编写的iGoogle小工具提供的网页嵌入代码.


PS0: 当然最重要的任务还是完善Pattern Recognition Online系统的功能和提高识别率的问题, 接着将完成图像连通度计算的部分, 这个日后再说…

PS1: 无论是使用GGE/(Google Gadgets Editor)还是更新Chrome Extension Pro主题页时, 服务器响应都有几分钟的延迟, 想必是Google为缓解服务器压力, 把几分钟之内的写事物(CRUD)合并为一次操作.

PS2: Pattern Recognition Online项目的source code(目前还没上传), flex客户端提供下载. ChromeExPro扩展的下载页在这里.

  1. 09月 14, 2010 @ 12:49 am | #1

    萎哥最近都没有更新啊

    • admin
      09月 14, 2010 @ 3:16 pm | #2

      一堆杂七杂八的破事,过两天还得把实验室网站重新做一下

  1. No trackbacks yet.

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Connecting to %s

加关注

Get every new post delivered to your Inbox.