<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[阿Tim日志]]></title> 
<link>https://atim.cn/index.php</link> 
<description><![CDATA[专业的php开发者.开发团队的带队人]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[阿Tim日志]]></copyright>
<item>
<link>https://atim.cn/post//</link>
<title><![CDATA[chrome生成二维码扩展]]></title> 
<author>bkkkd &lt;partybase@gmail.com&gt;</author>
<category><![CDATA[有感而发]]></category>
<pubDate>Sun, 14 Sep 2014 15:56:43 +0000</pubDate> 
<guid>https://atim.cn/post//</guid> 
<description>
<![CDATA[ 
	在firefox中有默认一个能将当前的网址生成一个二维码的功能。对于现在经常需要在移动端看网页的人来说。这十分重要。<br/><br/>但目前google已经全部被屏蔽的环境下，想下载一个好用的扩展基本上很难。<br/><br/>所以我决定自己写一个扩展用于生成当前页面的二维码。<br/><a href="https://atim.cn/attachment.php?fid=52" target="_blank"><img src="https://atim.cn/attachment.php?fid=52" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>首页要搞清楚扩展是怎么运作，manifest.json 用于配置扩展的相关信息，其中有几个重要的配置属性需要说明：<br/>1,content_script:在当前的页面中执行<br/>2background：运行于后端，用于监听各种事件<br/>3,browser_action：一个页面，用于显示各种弹出的功能。用于显示选项或者其它显示的功能。<br/><br/>另外他们之间系如何交换数据？<br/>1,content_script与backupground通信，主要通过chrome.runtime.sendMessage 把从content_script收集收到数据传到给background。而在background中通过监听 chrome.runtime.onMessage 事件，并作出对应的处理。<br/>2,background与browser_action通信，在backupground中不需要进行处理，只需要对创建属性即可。而该环境为安全盒子。不受其它的数据所影响。而browser_action中的js通过 chrome.extension.getBackgroundPage() 获取backupground环境中的属性值。<br/>3,content_script不能与browser_action通信。只能通过background进行交换数据。<br/><br/>最后完成了根据当前页面生成<br/>https://git.oschina.net/goodtim/chrome-taqr<br/><br/>参考页面：<br/>一个简单的扩展帮助文件&nbsp;&nbsp;http://www.lupaworld.com/article-228139-1.html<br/>chrome的接口文件 http://chrome.liuyixi.com/devguide.html
]]>
</description>
</item><item>
<link>https://atim.cn/post//#blogcomment</link>
<title><![CDATA[[评论] chrome生成二维码扩展]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://atim.cn/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>