<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kernel2Heart &#187; Firefox</title>
	<atom:link href="http://www.kernel2heart.com/labels/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kernel2heart.com</link>
	<description>一个人的内心里,究竟隐藏了什么呢?</description>
	<lastBuildDate>Fri, 20 May 2011 05:10:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>如何使用GreaseMonkey给页面添加超链接</title>
		<link>http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/</link>
		<comments>http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 10:00:35 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[GreaseMonkey]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/</guid>
		<description><![CDATA[GreaseMonkey是个很强大的软件，无论是在Firefox还是Chrome上的表现，都无疑是出众的。之前写过一篇关于GreaseMonkey的文章，但是一直时间不多，没有继续研究下去。 这次打算做一个某知名网站的辅助工具（平时还是firefox用得多，chrome是偶尔用下，不过理论上Firefox和Chrome都是兼容的），所以就把GreaseMonkey又上手了一下。 比如我们要在某一页面添加一个借口，比如说：显示楼主。通过对页面结构的观察（我是用的是Firebug，总之自己习惯的工具就好），发现可以在一个id名为“thread_nav_lef”的Div上添加一个链接。这个Div的结构大致如下： 1 2 3 4 5 6 7 8 9 10 &#60;div id=&#34;thread_nav_left&#34;&#62; &#60;ul&#62; &#160; &#60;li&#62;&#60;a onclick=&#34;Post.reply(&#38;#39;0&#38;#39;);&#34; href=&#34;#sub&#34;&#62;快速回复&#60;/a&#62;&#60;/li&#62; &#160; &#60;li&#62;&#60;a title=&#34;切换到经典版&#34; onclick=&#34;Page.changeVersion(2);return false;&#34; href=&#34;#&#34;&#62;切换到经典版&#60;/a&#62;&#60;/li&#62; &#160; &#60;/ul&#62; &#160; &#60;/div&#62; 这样可以这样写： 1 2 3 4 5 6 7 8 9 &#8230; <a href="http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kernel2heart.com/labels/greasemonkey/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GreaseMonkey">GreaseMonkey</a>是个很强大的软件，无论是在<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>还是Chrome上的表现，都无疑是出众的。之前写过<a href="http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/" target="_blank">一篇关于GreaseMonkey的文章</a>，但是一直时间不多，没有继续研究下去。</p>
<p>这次打算做一个某知名网站的辅助工具（平时还是<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">firefox</a>用得多，chrome是偶尔用下，不过理论上<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>和Chrome都是兼容的），所以就把<a href="http://www.kernel2heart.com/labels/greasemonkey/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GreaseMonkey">GreaseMonkey</a>又上手了一下。</p>
<p> <span id="more-430"></span>
<p>比如我们要在某一页面添加一个借口，比如说：显示楼主。通过对页面结构的观察（我是用的是Firebug，总之自己习惯的工具就好），发现可以在一个id名为“thread_nav_lef”的Div上添加一个链接。这个Div的结构大致如下：</p>
<blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;thread_nav_left&quot;</span><span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
&nbsp;
                 <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a onclick<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Post.reply(&amp;#39;0&amp;#39;);&quot;</span> href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;#sub&quot;</span><span style="color: #339933;">&gt;</span>快速回复<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
&nbsp;
                 <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a title<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;切换到经典版&quot;</span> onclick<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Page.changeVersion(2);return false;&quot;</span> href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">&gt;</span>切换到经典版<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
&nbsp;
            <span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
&nbsp;
        <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

</blockquote>
<p>这样可以这样写：</p>
<blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> init <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
        <span style="color: #003366; font-weight: bold;">var</span> showButton <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'thread_nav_left'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">childNodes</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">childNodes</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">//为什么第二个是2？因为2比较美观，第一个格式有点乱…. </span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> flli <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> fllink <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
        fllink.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'javascript:void(0);'</span><span style="color: #339933;">;</span> 
&nbsp;
        fllink.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'只看楼主'</span><span style="color: #339933;">;</span> 
&nbsp;
        flli.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>fllink<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
        fllink.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> filter<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Filter是个函数，当点击时会执行Filter函数 </span>
&nbsp;
        showButton.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>flli<span style="color: #339933;">,</span> showButton.<span style="color: #660066;">nextSibling</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

</blockquote>
<p>nextSibling是一个插入到指定节点之后的方法，如果插入指定节点之前，可以选择去掉nextSibling。</p>
<p>效果大致如下：快速回复   只看楼主  切换到经典版</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>GreaseMonkey的应用真是强大</title>
		<link>http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/</link>
		<comments>http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 10:34:28 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[GreaseMonkey]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/</guid>
		<description><![CDATA[今天无聊，想去下一个漫画来看，本来嘛，想着FX这么强大，一定有相关的扩展了，搜索了一番，失望而归。如果你晓得什么在看图的时候可以自动下载指定网址序列下图片的插件，也欢迎指教！ 好吧，事实上我打算写的东西也不在这个里面，仅仅只是一些简单的GM应用而已。 首先推荐一本入门教程，非常不错，像我这样的脚本白痴都可以看的懂的：《深入浅出Greasemonkey》。在里面也有很多很简单，但是却非常实用的例子，为快速上手GreaseMonkey脚本编写提供了非常方便的指南。 在参阅该教程几页之后，我也可以写一个清爽页面的脚本啦： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // ==UserScript== // @name 百度贴吧侧边栏广告去除器 // @namespace http://www.kernel2heart.com // @description 去除百度贴吧侧边栏广告，免广告功能请配合Adblock Plua使用 // @include http://tieba.baidu.com/* // @author 灰机要考研 // &#8230; <a href="http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>今天无聊，想去下一个漫画来看，本来嘛，想着FX这么强大，一定有相关的扩展了，搜索了一番，失望而归。如果你晓得什么<strong><font color="#ff0000">在看图的时候可以自动下载指定网址序列下图片的插件</font></strong>，也欢迎指教！</p>
<p>   <span id="more-261"></span>
<p>好吧，事实上我打算写的东西也不在这个里面，仅仅只是一些简单的GM应用而已。</p>
<p>首先推荐一本入门教程，非常不错，像我这样的脚本白痴都可以看的懂的：《<a href="http://www.firefox.net.cn/dig/" target="_blank">深入浅出Greasemonkey</a>》。在里面也有很多很简单，但是却非常实用的例子，为快速上手<a href="http://www.kernel2heart.com/labels/greasemonkey/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GreaseMonkey">GreaseMonkey</a>脚本编写提供了非常方便的指南。</p>
<p>在参阅该教程几页之后，我也可以写一个清爽页面的脚本啦：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// ==UserScript==</span>
<span style="color: #006600; font-style: italic;">// @name           百度贴吧侧边栏广告去除器</span>
<span style="color: #006600; font-style: italic;">// @namespace      http://www.kernel2heart.com</span>
<span style="color: #006600; font-style: italic;">// @description    去除百度贴吧侧边栏广告，免广告功能请配合Adblock Plua使用</span>
<span style="color: #006600; font-style: italic;">// @include        http://tieba.baidu.com/*</span>
<span style="color: #006600; font-style: italic;">// @author         灰机要考研</span>
<span style="color: #006600; font-style: italic;">// @version        0.01</span>
<span style="color: #006600; font-style: italic;">/* @reason
* 支持去除普通百度贴吧侧边栏广告
* 横幅flash和图片广告请使用Adblock plus去除
@end*/</span>
<span style="color: #006600; font-style: italic;">// ==/UserScript==</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> adSidebar <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rightAd'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>adSidebar<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    adSidebar.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">removeChild</span><span style="color: #009900;">&#40;</span>adSidebar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>如果比较感兴趣如何实现这些功能的，可以参见《<a href="http://www.firefox.net.cn/dig/" target="_blank">深入浅出Greasemonkey</a>》。GM的功能在处理网页时实在是太强大了，通过<a href="http://www.kernel2heart.com/labels/greasemonkey/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GreaseMonkey">GreaseMonkey</a>就可以轻松操纵网页的任意内容了，不过可惜的是，就我的使用经验来说，好像GM需要等待页面载入完成之后才会执行脚本，这样的话，比如载入去广告脚本的时候，广告还是会一闪而过的，算是一个缺点吧。</p>
<p>我是一个JS苦手，其实在去除其他广告时也有其他措施的，例如一个Div广告具有class=sponsoredlink属性，且唯一，可以这样获得：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">thisDiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">evaluate</span><span style="color: #009900;">&#40;</span>
    <span style="color: #3366CC;">&quot;//div[@class='sponsoredlink']&quot;</span><span style="color: #339933;">,</span>
    document<span style="color: #339933;">,</span>
    <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
    XPathResult.<span style="color: #660066;">UNORDERED_NODE_SNAPSHOT_TYPE</span><span style="color: #339933;">,</span>
    <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>如果属性不唯一的话，会返回元素组，如果RemoveChild的时候，会对所有元素进行操作。</p>
<p>有其他问题，欢迎一起交流，GM脚本的编写我才刚刚开始看，如果你有兴趣，我们可以一起学习。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>用于替代Xmarks的Firefox同步扩展：Weave</title>
		<link>http://www.kernel2heart.com/2009/10/new-sync-plugin-weave/</link>
		<comments>http://www.kernel2heart.com/2009/10/new-sync-plugin-weave/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 05:32:28 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[八卦资讯]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[墙]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/10/new-sync-plugin-weave/</guid>
		<description><![CDATA[最近因为墙的原因，Xmarks总是连接超时。根据在著名Web 2.0新闻站点CnBeta的统计显示，全国大部分地区都出现了无法连接Xmarks服务器的现象。Weave（非Google Wave）作为一款同步软件，在我测试之后功能和同步速度均不错，所以拿出来和大家分享一下。 如何安装Weave 如果你想安装Weave，打开Firefox，点击“工具”-&#62;“附加组件”，在“获取附加组件”中输入Weave，搜索，或者直接访问https://addons.mozilla.org/zh-CN/firefox/addon/10868安装该组件。 我已经安装过了，现在看不到。 &#160; 如何使用Weave 事实上Weave是Mozilla Labs开发的组件，可以在Firefox地址栏中输入about:weave直接访问。 打开时会询问你是否有Weave的帐户，点No就可以注册新账户了。注册步骤很简单，类似Xmarks一样，有登陆密码和加密密码，登陆的时候都会用到。注册完成之后就可以正常使用了。注意过程中有选择同步内容的选项，默认全部打开，如果没有什么要求的话可以使用默认选项，因为同步的速度本来就很快。 需要同步时，可以点击下方的Weave图标，选择“Sync Now”即可开始同步。而且在下方还会显示Last update的时间，十分方便。]]></description>
			<content:encoded><![CDATA[<p>最近因为墙的原因，Xmarks总是连接超时。根据在著名Web 2.0新闻站点CnBeta的统计显示，全国大部分地区都出现了无法连接Xmarks服务器的现象。Weave（非Google Wave）作为一款同步软件，在我测试之后功能和同步速度均不错，所以拿出来和大家分享一下。</p>
<p> <span id="more-256"></span><br />
<h2>如何安装Weave</h2>
<p>如果你想安装Weave，打开<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>，点击“工具”-&gt;“附加组件”，在“获取附加组件”中输入Weave，搜索，或者直接访问<a title="https://addons.mozilla.org/zh-CN/firefox/addon/10868" href="https://addons.mozilla.org/zh-CN/firefox/addon/10868">https://addons.mozilla.org/zh-CN/firefox/addon/10868</a>安装该组件。</p>
<p><a href="http://www.kernel2heart.com/wp-content/uploads/2009/10/1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="1" border="0" alt="1" src="http://www.kernel2heart.com/wp-content/uploads/2009/10/1_thumb.png" width="415" height="301" /></a> </p>
<p>我已经安装过了，现在看不到。</p>
<p>&#160;</p>
<h2>如何使用Weave</h2>
<p>事实上Weave是Mozilla Labs开发的组件，可以在<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>地址栏中输入about:weave直接访问。</p>
<p><a href="http://www.kernel2heart.com/wp-content/uploads/2009/10/2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2" border="0" alt="2" src="http://www.kernel2heart.com/wp-content/uploads/2009/10/2_thumb.png" width="600" height="376" /></a> </p>
<p>打开时会询问你是否有Weave的帐户，点No就可以注册新账户了。注册步骤很简单，类似Xmarks一样，有登陆密码和加密密码，登陆的时候都会用到。注册完成之后就可以正常使用了。注意过程中有选择同步内容的选项，默认全部打开，如果没有什么要求的话可以使用默认选项，因为同步的速度本来就很快。</p>
<p><a href="http://www.kernel2heart.com/wp-content/uploads/2009/10/3.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="3" border="0" alt="3" src="http://www.kernel2heart.com/wp-content/uploads/2009/10/3_thumb.png" width="182" height="75" /></a> </p>
<p>需要同步时，可以点击下方的Weave图标，选择“Sync Now”即可开始同步。而且在下方还会显示Last update的时间，十分方便。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/10/new-sync-plugin-weave/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Firefox Portable安装插件</title>
		<link>http://www.kernel2heart.com/2009/10/how-to-install-plugins-into-firefox-portable/</link>
		<comments>http://www.kernel2heart.com/2009/10/how-to-install-plugins-into-firefox-portable/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 05:03:00 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/10/how-to-install-plugins-into-firefox-portable/</guid>
		<description><![CDATA[首先，你要區分清楚什麼是Firefox的擴展，什麼是Firefox的插件： 插件通常是第三方应用程序提供给firefox使用的二进制文件。也就是说第三方应用程序把相关功能编译成了二进制的机器指令提供给各类浏览器，方便它们调用。 windows下的firefox插件通常是dll格式，例如，Adobe提供给firefox的插件“Adobe shockwave flash”则使其能显示网页中嵌入的flash。 扩展通常是扩展开发者为了修改或者增强firefox本身的功能而提供的一种打包格式。它通常由包含功能代码的js脚本、包含界面的xul文件以及包含皮肤的css文件和各种图像文件组成。少数特定平台下的扩展可能还会附带一些二进制文件。扩展的格式都是xpi后缀的。常见的扩展有noscript、adblock plus等。 援引自：http://www.firefox.net.cn/forum/viewtopic.php?t=25314 之所以會提到給Firefox Portable添加插件是因為我在安裝WMP插件的時候發現Firefox Portable程序不能正確識別通過安裝方式安裝的WMP for Firefox，這就給我看一些視頻趙成了困擾。本著研究精神，我分析了一下Firefox Portable插件的安裝方法。 如果你沒興趣看分析，可以直接跳到安裝步驟中去，中間基本屬於廢話。 Firefox本身的插件識別方法 Firefox本身在識別插件的時候利用了註冊表查找註冊了的插件列表，其目錄保存在註冊表中的以下項目中： HKEY_CURRENT_USER\Software\MozillaPlugins HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins 並且更新至Data數據文件的Pluginreg.dat文件中。經過觀察發現HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins保存了絕大部分的插件，以公司名和版本號命名，非常容易識別。在普通版Firefox安裝WMP等插件時，會自動創建對應的註冊表項目，並且把對應的文件拷貝到Plugins目錄下對應文件。例如WMP插件安裝時會安裝np-mswmp.dll、WMP Firefox Plugin License.rtf和WMP Firefox Plugin RelNotes.txt三個文件。其中np-mswmp.dll才是最核心的文件。 如何為Firefox Portable安裝插件 最初我把問題考慮的太過複雜，實際上，如果想要安裝插件到Firefox Portable，僅僅需要將對應插件的DLL文件拷貝到Firefox Portable安裝目錄下的Data\Plugins目錄下，Firefox Portable會自動識別對應的插件並使用了。 已安裝WMP for firefox為例，提取DLL文件np-mswmp.dll，拷貝到Firefox Portable安裝目錄下的Data\Plugins目錄下之後，重啟Firefox，就可以自動識別對應的插件了。 &#160; 文中提到的WMP插件下載：brsbox &#124; vDisk]]></description>
			<content:encoded><![CDATA[<p>首先，你要區分清楚什麼是<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>的擴展，什麼是<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>的插件：</p>
<blockquote><p><strong><font color="#ff0000">插件</font></strong>通常是第三方应用程序提供给<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">firefox</a>使用的二进制文件。也就是说第三方应用程序把相关功能编译成了二进制的机器指令提供给各类浏览器，方便它们调用。 windows下的<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">firefox</a>插件通常是dll格式，例如，Adobe提供给<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">firefox</a>的插件“Adobe shockwave flash”则使其能显示网页中嵌入的flash。</p>
<p><strong><font color="#ff0000">扩展</font></strong>通常是扩展开发者为了修改或者增强<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">firefox</a>本身的功能而提供的一种打包格式。它通常由包含功能代码的js脚本、包含界面的xul文件以及包含皮肤的css文件和各种图像文件组成。少数特定平台下的扩展可能还会附带一些二进制文件。扩展的格式都是xpi后缀的。常见的扩展有noscript、adblock plus等。 </p>
<p>援引自：<a title="http://www.firefox.net.cn/forum/viewtopic.php?t=25314" href="http://www.firefox.net.cn/forum/viewtopic.php?t=25314">http://www.firefox.net.cn/forum/viewtopic.php?t=25314</a></p>
</blockquote>
<p>之所以會提到給<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Portable添加插件是因為我在安裝WMP插件的時候發現<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Portable程序不能正確識別通過安裝方式安裝的WMP for <a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>，這就給我看一些視頻趙成了困擾。本著研究精神，我分析了一下<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Portable插件的安裝方法。</p>
<p> <span id="more-240"></span>
</p>
<p>如果你沒興趣看分析，可以直接跳到安裝步驟中去，中間基本屬於廢話。</p>
<h2><a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>本身的插件識別方法</h2>
<p><a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>本身在識別插件的時候利用了註冊表查找註冊了的插件列表，其目錄保存在註冊表中的以下項目中：</p>
<blockquote><p>HKEY_CURRENT_USER\Software\MozillaPlugins</p>
<p>HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins</p>
</blockquote>
<p>並且更新至Data數據文件的Pluginreg.dat文件中。經過觀察發現HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins保存了絕大部分的插件，以公司名和版本號命名，非常容易識別。在普通版<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>安裝WMP等插件時，會自動創建對應的註冊表項目，並且把對應的文件拷貝到<a href="http://www.kernel2heart.com/labels/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Plugins">Plugins</a>目錄下對應文件。例如WMP插件安裝時會安裝np-mswmp.dll、WMP <a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Plugin License.rtf和WMP <a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Plugin RelNotes.txt三個文件。其中np-mswmp.dll才是最核心的文件。</p>
<h2>如何為<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Portable安裝插件</h2>
<p>最初我把問題考慮的太過複雜，實際上，如果想要安裝插件到<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Portable，僅僅需要將對應插件的DLL文件拷貝到<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Portable安裝目錄下的Data\<a href="http://www.kernel2heart.com/labels/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Plugins">Plugins</a>目錄下，<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Portable會自動識別對應的插件並使用了。</p>
<p>已安裝WMP for <a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">firefox</a>為例，提取DLL文件np-mswmp.dll，拷貝到<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> Portable安裝目錄下的Data\<a href="http://www.kernel2heart.com/labels/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Plugins">Plugins</a>目錄下之後，重啟<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a>，就可以自動識別對應的插件了。</p>
<p>&#160;</p>
<p>文中提到的WMP插件下載：<a href="http://www.brsbox.com/filebox/down/fc/856f9d5ee34968a1859513767190a5ad" target="_blank">brsbox</a> | <a href="http://www.vdisk.cn/down/index/3770269A3170/np-mswmp.zip.html" target="_blank">vDisk</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/10/how-to-install-plugins-into-firefox-portable/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Firefox 3.5 Released</title>
		<link>http://www.kernel2heart.com/2009/07/firefox-3-5-released/</link>
		<comments>http://www.kernel2heart.com/2009/07/firefox-3-5-released/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 14:05:53 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[八卦资讯]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/07/firefox-3-5-released/</guid>
		<description><![CDATA[虽然更新这个文章多少有一点晚了，没错，Firefox 3.5正式发布了。 伴随Firefox 3.5的正式发布，我们熟悉的火狐狸也发生了一些细微的变化。如果你熟悉它，一定可以发现它变得更加柔性化了。根据mozilla ftp的源更新来看，实际上Firefox 3.5更新选用的是最新的24日RC版本。（根据mozilla惯例，总是选择最新的RC版直接作为最后的正式版。这次的签名是6月24日的签名，证明此日期版本作为了最后的正式版。） 因为之前一直在用Firefox 3.5 RC版的缘故，对Firefox 3.5的改变体验并不是很明显。不过最大的感觉莫过于浏览器的开启速度明显要比之前的2.x和3.0.x明显要快上很多。其他的具体体验对我来说，最大的障碍在于扩展上的问题了。Google的多款扩展失效，一些常用扩展也因为没有更新无法支持Firefox 3.5版本。比如Google Gears等等扩展因为不兼容而被自动禁用。 扩展阅读：FireFox 3.5速度比3.0版快2倍 允许秘密浏览 &#124; Firefox 3.5:很快 但还是不够 以上文中观点不代表本博客和本人观点，仅供参考。 关于其他的各种特性，希望大家在以后的使用中慢慢发现。但是本人还是那种态度，虽然js的渲染速度提高了数倍，但是对于我们这种网速较慢的学生来说，那仅仅几微秒的差距基本都被忽略不计了。所以对一些人来说，像搜狗浏览器这种带有网页加速功能的软件才是他们的最爱吧。]]></description>
			<content:encoded><![CDATA[<p>虽然更新这个文章多少有一点晚了，没错，<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> 3.5正式发布了。</p>
<p>伴随<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> 3.5的正式发布，我们熟悉的火狐狸也发生了一些细微的变化。如果你熟悉它，一定可以发现它变得更加柔性化了。根据mozilla ftp的源更新来看，实际上<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> 3.5更新选用的是最新的24日RC版本。（根据mozilla惯例，总是选择最新的RC版直接作为最后的正式版。这次的签名是6月24日的签名，证明此日期版本作为了最后的正式版。）<span id="more-73"></span></p>
<p>因为之前一直在用<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> 3.5 RC版的缘故，对<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> 3.5的改变体验并不是很明显。不过最大的感觉莫过于浏览器的开启速度明显要比之前的2.x和3.0.x明显要快上很多。其他的具体体验对我来说，最大的障碍在于扩展上的问题了。Google的多款扩展失效，一些常用扩展也因为没有更新无法支持<a href="http://www.kernel2heart.com/labels/firefox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Firefox">Firefox</a> 3.5版本。比如Google Gears等等扩展因为不兼容而被自动禁用。</p>
<blockquote><p>扩展阅读：<a href="http://www.cnbeta.com/articles/87729.htm" target="_blank">FireFox 3.5速度比3.0版快2倍 允许秘密浏览</a> | <a href="http://www.cnbeta.com/articles/87770.htm" target="_blank">Firefox 3.5:很快 但还是不够</a><br />
<em>以上文中观点不代表本博客和本人观点，仅供参考。</em></p></blockquote>
<p>关于其他的各种特性，希望大家在以后的使用中慢慢发现。但是本人还是那种态度，虽然js的渲染速度提高了数倍，但是对于我们这种网速较慢的学生来说，那仅仅几微秒的差距基本都被忽略不计了。所以对一些人来说，像<a href="http://ie.sogou.com" target="_blank">搜狗浏览器</a>这种带有网页加速功能的软件才是他们的最爱吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/07/firefox-3-5-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

