<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Yining.write() &#187; Firefox</title>
	<atom:link href="http://www.yining.org/category/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yining.org</link>
	<description>public virtual stream Yining.write()</description>
	<lastBuildDate>Fri, 04 Jun 2010 12:01:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>		<item>
		<title>八行语句KISS豆瓣</title>
		<link>http://www.yining.org/2008/04/01/kiss-douban-with-greasemonkey/</link>
		<comments>http://www.yining.org/2008/04/01/kiss-douban-with-greasemonkey/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 22:37:35 +0000</pubDate>
		<dc:creator>Yining</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[douban]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[豆瓣]]></category>

		<guid isPermaLink="false">http://www.yining.org/?p=142</guid>
		<description><![CDATA[作为一个喜欢读书看碟的人，我一直把豆瓣当作非常喜欢且每天必上去转几圈的网站。可是最近的豆瓣越来越不让我喜欢，或者说不能让我越来越喜欢。在推出“广播”之后，最近推出日记，接着推出推荐网址，这对在豆瓣上找书看影评的我来说，不仅没有用处，“信号”降低了，“噪音”反而升高了。
我不想离开豆瓣，但是又不想受到这些干扰，就想干脆用GreaseMonkey扩展来写个脚本把不想看到的东西屏蔽掉吧，Keep It Simple, Sweet.
我的目的很简单，就是要把右边栏屏蔽然后把左边主要内容横向伸展开。试了一下，只要八行脚本语句就能暂时满足我的要求，这里要强烈赞一下豆瓣的开发团队，要不是他们写的页面代码很一致（嘿，页面也是API），脚本就可能很复杂甚至让我放弃这个念头 ;-)
脚本如下：

// ==UserScript==
// @name           mini douban
// @namespace      douban
// @include        http://www.douban.com/*
// ==/UserScript==

a = document.getElementById('tablerm');
if (a) a.setAttribute('style', 'display:none');

a = document.getElementById('tabler');
if (a) a.setAttribute('style', 'display:none');

a = document.getElementById('in_table');
if (a) a.setAttribute('style', 'width:100%');

a = document.getElementById('in_tablem');
if (a) a.setAttribute('style', [...]]]></description>
			<content:encoded><![CDATA[<p>作为一个喜欢读书看碟的人，我一直把<a href="http://www.douban.com">豆瓣</a>当作非常喜欢且每天必上去转几圈的网站。可是最近的豆瓣越来越不让我喜欢，或者说不能让我越来越喜欢。在推出“广播”之后，最近推出日记，接着推出推荐网址，这对在豆瓣上找书看影评的我来说，不仅没有用处，“信号”降低了，“噪音”反而升高了。</p>
<p>我不想离开豆瓣，但是又不想受到这些干扰，就想干脆用<a href="http://www.greasespot.net/">GreaseMonkey扩展</a>来写个脚本把不想看到的东西屏蔽掉吧，Keep It Simple, Sweet.</p>
<p>我的目的很简单，就是要把右边栏屏蔽然后把左边主要内容横向伸展开。试了一下，只要八行脚本语句就能暂时满足我的要求，这里要强烈赞一下豆瓣的开发团队，要不是他们写的页面代码很一致（嘿，<a href="http://www.yining.org/2007/06/07/your-markup-is-api/">页面也是API</a>），脚本就可能很复杂甚至让我放弃这个念头 ;-)</p>
<p>脚本如下：</p>
<pre class="prettyprint">
// ==UserScript==
// @name           mini douban
// @namespace      douban
// @include        http://www.douban.com/*
// ==/UserScript==

a = document.getElementById('tablerm');
if (a) a.setAttribute('style', 'display:none');

a = document.getElementById('tabler');
if (a) a.setAttribute('style', 'display:none');

a = document.getElementById('in_table');
if (a) a.setAttribute('style', 'width:100%');

a = document.getElementById('in_tablem');
if (a) a.setAttribute('style', 'width:100%');
</pre>
<p>好了，现在不妨趁机说说意见：</p>
<p>首先，我想我能理解豆瓣做这些新功能（比如在不断增加大量用户在读看听上的喜好和选择的数据基础上，可以尽量深入收集，发现和发掘更深层次的潜在数据），但是对我个人来说更希望能帮<b>我</b>发掘更多的数据，这方面的服务似乎有提高的空间，举例来说，《枪炮，病菌与钢铁》这本书我看过了，很喜欢，可是豆瓣依然向我推荐繁体版和英文版，更不要说大量原英文版和翻译的中文版的技术书籍了，读了其中之一就不大会再读其它的，类似的问题还有不同版次的书（这方面技术书籍问题更多），在“豆瓣猜”的列表下，我该不该选“不感兴趣”呢？</p>
<p>Web2.0，长尾，Abundance，UGC，&#8230;. 在数据和信息越来越多的时代，我更需要的是提高信噪比。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yining.org/2008/04/01/kiss-douban-with-greasemonkey/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TWSStopper可以下载了</title>
		<link>http://www.yining.org/2007/12/11/twsstopper-firefox-extension/</link>
		<comments>http://www.yining.org/2007/12/11/twsstopper-firefox-extension/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 16:20:27 +0000</pubDate>
		<dc:creator>Yining</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[GTD]]></category>
		<category><![CDATA[lifehacks]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[twsstopper]]></category>

		<guid isPermaLink="false">http://www.yining.org/2007/12/11/twsstopper-firefox-extension/</guid>
		<description><![CDATA[自从几天前写了“我的GTD工具之一: DIY一个Firefox扩展”，有朋友来要求提供下载地址。感谢大家关注，现在已经可以提供下载了。
当时没能提供下载地址是因为：

这是我自己边学边写的第一个Firefox扩展（之前发布的HTML Entity Char Lookup其实是第二个），因为一直断断续续在开发，因此用的一直是本地目录（Firefox支持开发和测试时候，扩展使用解压后的独立目录）的形式，没有直接打包成可直接安装的xpi文件；
Firefox 3.0b1发布，而该版本在安全性方面增加了新的要求，为了让发布后的扩展支持安全更新，又花了点时间；
这几天我在忙着Get GTD Done :p &#8230;

请感兴趣的朋友访问，在TWSStopper扩展的主页那里点击Install就能下载。
已经有朋友发现以下问题：

在某些Firefox上，不能安装这个扩展，出现“不合法的安装包”的错误信息，但是我没能重新这个Bug :-( 不知道有多少朋友遇到这个问题 :-( 
在MacOS上，时间段的Tab上的日期下拉框里的日期无法显示日期数字，而是显示“&#8230;”；
一个愚蠢的错误：时间段的输入里&#8221;To&#8221;和“From&#8221;标记搞反了；

如果使用上还发现其它问题，请大家原谅，或者有新需求，请在这里留言。我会尽量满足。
谢谢。
更新(2008/09/09):
现在能在Firefox 3.0.1以上版本运行了。
]]></description>
			<content:encoded><![CDATA[<p>自从几天前写了<a href="http://www.yining.org/2007/12/05/my-gtd-tools-twsstopper/">“我的GTD工具之一: DIY一个Firefox扩展”</a>，有朋友来要求提供下载地址。感谢大家关注，现在已经可以提供下载了。</p>
<p>当时没能提供下载地址是因为：</p>
<ul>
<li>这是我自己边学边写的第一个Firefox扩展（之前发布的<a href="http://www.yining.org/2007/07/26/html-entity-char-lookup-firefox-extension/">HTML Entity Char Lookup</a>其实是第二个），因为一直断断续续在开发，因此用的一直是本地目录（Firefox支持开发和测试时候，扩展使用解压后的独立目录）的形式，没有直接打包成可直接安装的xpi文件；</li>
<li>Firefox 3.0b1发布，而该版本在安全性方面增加了新的要求，为了让发布后的扩展支持<a href="http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Securing_Updates">安全更新</a>，又花了点时间；</li>
<li>这几天我在忙着Get GTD Done :p &#8230;</li>
</ul>
<p>请感兴趣的朋友访问，在<a href="http://www.yining.org/firefox/extensions/twsstopper/">TWSStopper扩展的主页</a>那里点击Install就能下载。</p>
<p>已经有朋友发现以下问题：</p>
<ul>
<li>在某些Firefox上，不能安装这个扩展，出现“不合法的安装包”的错误信息，但是我没能重新这个Bug :-( 不知道有多少朋友遇到这个问题 :-( </li>
<li>在MacOS上，时间段的Tab上的日期下拉框里的日期无法显示日期数字，而是显示“&#8230;”；</li>
<li>一个愚蠢的错误：时间段的输入里&#8221;To&#8221;和“From&#8221;标记搞反了；</li>
</ul>
<p>如果使用上还发现其它问题，请大家原谅，或者有新需求，请在这里留言。我会尽量满足。</p>
<p>谢谢。</p>
<p>更新(2008/09/09):<br />
现在能在Firefox 3.0.1以上版本运行了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yining.org/2007/12/11/twsstopper-firefox-extension/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>我的GTD工具之一: DIY一个Firefox扩展</title>
		<link>http://www.yining.org/2007/12/05/my-gtd-tools-twsstopper/</link>
		<comments>http://www.yining.org/2007/12/05/my-gtd-tools-twsstopper/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 20:21:37 +0000</pubDate>
		<dc:creator>Yining</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[GTD]]></category>
		<category><![CDATA[lifehacks]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[twsstopper]]></category>

		<guid isPermaLink="false">http://www.yining.org/2007/12/05/my-gtd-tools-twsstopper/</guid>
		<description><![CDATA[每天都有很多网页要看，500多个Blog Feeds，常看的论坛，许多Twitter上发来的链接，那是相当的消耗时间，而且每个网页里有很多链接，往往会再跟着点击看下去，如此重复&#8230; 等全部看完，才发现很多时间已经过去，尤其是应该工作等正经事情的时间。
在网络开发的术语里有句话叫作：Hypermedia as the Engine of Application State，直白的翻译是：超媒体是网络应用程序状态变化的引擎。这句话放到我平时浏览网页的情况下，就是：Hypermedia as the Engine of Attention State：超链接是我注意力跳转的引擎。
于是，为了强迫自己不上那些经常会消耗时间的网站，自己写了一个Firefox扩展：TWSStopper，全称: Time Wasting Site Stopper （我知道，我在取名字方面真的很差劲 :p）。
现在，当我去某个非常浪费时间的网站的时候，Firefox就会拒绝，同时会跳出这个对话框：

但是如果我就是要去那个网站的时候，可以选择暂时“释放”一下，点击状态栏或者右键子菜单的&#8221;Unblock Me&#8230;&#8221;

这时候，TWSStopper会“挑战”我，必须毫无错误地输入一长串随机生成的字符串，长度可以在扩展的选项里修改，图中是30个字符。

如果我愿意并且完成这个挑战，就可以选择“释放”的时间长度，最长半小时。在这段时间里，所有“黑名单”上的网站暂时都可以访问了。

扩展的选项：


添加和管理那些对我来说是消耗很多时间的网站：



设置我需要干活的时间段，就是不让自己访问消耗时间的网站的时间段：



其他选项，包括随机字符串的长度，对话框内容等：



当然，要绕过TWSStopper有很多办法：

卸载这个扩展；
Disable这个扩展；
使用另外一个没有个扩展的Firefox Profile；
用别的浏览器 － 还好，我只用Firefox；
&#8230;

但是，这些手段足够麻烦（比如要重启Firefox等），最重要的是，采用这些手段的本身就足以让自己意识到自己已经在不让自己Get things done了，这时候，我就会停下来。
就像《Following Through》（一本关于如何完成要做的事情的书，类似那本非常有名的《Get Things Done》）在关于如何对付影响自己GTD的因素时候说的：

You usually don&#8217;t have to make it impossible to go backwards, you just have to make it, difficult enough.
你不需要让它（影响GTD的因素）变成不可能，你只需要让它变得足够难。
Choose an obstacle and give it a try. [...]]]></description>
			<content:encoded><![CDATA[<p>每天都有很多网页要看，500多个Blog Feeds，常看的论坛，许多Twitter上发来的链接，那是相当的消耗时间，而且每个网页里有很多链接，往往会再跟着点击看下去，如此重复&#8230; 等全部看完，才发现很多时间已经过去，尤其是应该工作等正经事情的时间。</p>
<p>在网络开发的术语里有句话叫作：Hypermedia as the Engine of Application State，直白的翻译是：超媒体是网络应用程序状态变化的引擎。这句话放到我平时浏览网页的情况下，就是：Hypermedia as the Engine of Attention State：超链接是我注意力跳转的引擎。</p>
<p>于是，为了强迫自己不上那些经常会消耗时间的网站，自己写了一个Firefox扩展：TWSStopper，全称: Time Wasting Site Stopper （我知道，我在取名字方面真的很差劲 :p）。</p>
<p>现在，当我去某个非常浪费时间的网站的时候，Firefox就会拒绝，同时会跳出这个对话框：</p>
<p><a href="http://www.flickr.com/photos/yining/2064137157/" title="stop by ZhangYining, on Flickr"><img src="http://farm3.static.flickr.com/2181/2064137157_11e44407d5_o.png" border="0" width="358" height="130" alt="stop" /></a></p>
<p>但是如果我就是要去那个网站的时候，可以选择暂时“释放”一下，点击状态栏或者右键子菜单的&#8221;Unblock Me&#8230;&#8221;</p>
<p><a href="http://www.flickr.com/photos/yining/2064137163/" title="statusbar-1 by ZhangYining, on Flickr"><img src="http://farm3.static.flickr.com/2209/2064137163_b31793fbfd_o.png" border="0" width="512" height="120" alt="statusbar-1" /></a></p>
<p>这时候，TWSStopper会“挑战”我，必须毫无错误地输入一长串随机生成的字符串，长度可以在扩展的选项里修改，图中是30个字符。</p>
<p><a href="http://www.flickr.com/photos/yining/2064137161/" title="challenge by ZhangYining, on Flickr"><img src="http://farm3.static.flickr.com/2283/2064137161_1fb088855b_o.png" border="0" width="394" height="188" alt="challenge" /></a></p>
<p>如果我愿意并且完成这个挑战，就可以选择“释放”的时间长度，最长半小时。在这段时间里，所有“黑名单”上的网站暂时都可以访问了。</p>
<p><a href="http://www.flickr.com/photos/yining/2086686977/" title="unblock-time-limit by ZhangYining, on Flickr"><img src="http://farm3.static.flickr.com/2133/2086686977_1623591377_o.png" border="0" width="310" height="141" alt="unblock-time-limit" /></a></p>
<p>扩展的选项：</p>
<ul>
<li>
添加和管理那些对我来说是消耗很多时间的网站：</p>
<p><a href="http://www.flickr.com/photos/yining/2064936544/" title="options-1 by ZhangYining, on Flickr"><img src="http://farm3.static.flickr.com/2155/2064936544_a3c271b8b1_m.jpg" border="0" width="240" height="240" alt="options-1" /></a>
</li>
<li>
设置我需要干活的时间段，就是不让自己访问消耗时间的网站的时间段：</p>
<p><a href="http://www.flickr.com/photos/yining/2064936546/" title="options-2 by ZhangYining, on Flickr"><img src="http://farm3.static.flickr.com/2231/2064936546_bcc1e2c7c9_m.jpg" border="0" width="240" height="240" alt="options-2" /></a>
</li>
<li>
其他选项，包括随机字符串的长度，对话框内容等：</p>
<p><a href="http://www.flickr.com/photos/yining/2064936550/" title="options-3 by ZhangYining, on Flickr"><img src="http://farm3.static.flickr.com/2007/2064936550_074b59123a_m.jpg" border="0" width="240" height="240" alt="options-3" /></a>
</li>
</ul>
<p>当然，要绕过TWSStopper有很多办法：</p>
<ul>
<li>卸载这个扩展；</li>
<li>Disable这个扩展；</li>
<li>使用另外一个没有个扩展的Firefox Profile；</li>
<li>用别的浏览器 － 还好，我只用Firefox；</li>
<li>&#8230;</li>
</ul>
<p>但是，这些手段足够麻烦（比如要重启Firefox等），最重要的是，采用这些手段的本身就足以让自己意识到自己已经在不让自己Get things done了，这时候，我就会停下来。</p>
<p>就像<a href="http://www.douban.com/subject/1400308/">《Following Through》</a>（一本关于如何完成要做的事情的书，类似那本非常有名的《Get Things Done》）在关于如何对付影响自己GTD的因素时候说的：</p>
<blockquote><p>
You usually don&#8217;t have to make it <em>impossible</em> to go backwards, you just have to make it, <em>difficult enough</em>.<br />
你不需要让它（影响GTD的因素）变成不可能，你只需要让它变得足够难。</p>
<p>Choose an obstacle and give it a try. If it doesn&#8217;t work, don&#8217;t stop there. Build on the obstacle or replace it with a bigger one. Keep experimenting until you&#8217;re moving forward.</p>
<p>选择一个障碍试试看，如果行不通，别停止。在它的基础上建一个或者换一个更大的障碍。不断试验直到你能够前进。
</p></blockquote>
<p>这个扩展就是变得让我访问那些消耗时间的网站变得“足够难”的障碍 :-) 从开始使用到现在几个月来，效果还不错，而且慢慢地，即使可能，也不去访问其中一些网站了。</p>
<p>Bruce (Number5)<a href="http://twitter.com/number5/statuses/428077952">曾经说</a>：</p>
<blockquote><p>
&#8230;生产力工具的主要功能是心理安慰。你觉得最有效的生产力工具是什么？
</p></blockquote>
<p>首先，对他的看法，我感同身受。我的理解是：使用效率工具(Productivity Tools或者GTD tools)本身只能表明我有把事情做完和提高效率的<heavy>意愿(Intention)</heavy>，但是有去做的意愿并不等于去做了，意愿本身是不能变成行动(Action)，而且在执行意愿的过程中，又有许多自身引起的负面的影响因素。</p>
<p>用<a href="http://www.43folders.com/">43Folders</a>上的一幅图来说明：</p>
<p><img src="http://static.flickr.com/107/308854657_b27b0cbaa7.jpg"/></p>
<p>Dumbass是我自身一些会影响GTD的潜意识和本性或者本能，Smarty Pants是指要GTD的意愿和能够意识到Dumbass的存在并且想办法阻止或者让Dumbass为我所用的能力。</p>
<p>Hey, Bruce，这是我回答你的问题的第一个答案 :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yining.org/2007/12/05/my-gtd-tools-twsstopper/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Firefox Extension: HTML Entity Character Lookup</title>
		<link>http://www.yining.org/2007/07/26/html-entity-char-lookup-firefox-extension/</link>
		<comments>http://www.yining.org/2007/07/26/html-entity-char-lookup-firefox-extension/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 11:21:40 +0000</pubDate>
		<dc:creator>Yining</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[WebDesign]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.yining.org/2007/07/26/html-entity-char-lookup-firefox-extension/</guid>
		<description><![CDATA[Remy Sharp wrote a web service to look up HTML Entity Character. The service &#8220;allows you to quickly find the entity based on how it looks&#8221;. There is also an OpenSearch plugin and MacOS Dashboard widget. Kudos to Remy!
I figured a Firefox extension clone would be handy, and it wouldn&#8217;t be too difficult to make [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://leftlogic.com/lounge/articles/entity-lookup/">Remy Sharp wrote a web service</a> to look up <a href="http://www.w3.org/TR/html4/sgml/entities.html">HTML Entity Character</a>. The service &#8220;allows you to quickly find the entity based on how it looks&#8221;. There is also an OpenSearch plugin and MacOS Dashboard widget. Kudos to Remy!</p>
<p>I figured a Firefox extension clone would be handy, and it wouldn&#8217;t be too difficult to make one, thus:</p>
<p><img src="http://yining.org/firefox/extensions/html-entity-char-lookup/screenshot-lookup-window-1.png"/></p>
<p>This extenion is simple: a GUI wraps and calls the Javascript code Remy wrote (with a little modifiication, basically renaming global variables to make them unique) and then displays the result. The code is licensed under Creative Commons by-sa 2.5, same as Remy&#8217;s code.</p>
<p>It should work on Firefox from version 1.5 and above (have tested on 3.0aPre7 too), also on Netscape Navigator and Flock, let me know if you have any problem using it.</p>
<p>To try out, go to <a href="http://www.yining.org/firefox/extensions/html-entity-char-lookup/">the extension&#8217;s home page</a> and click install (it&#8217;s currently hosted on my server, so you have to let Firefox allow download and install extension from my server).</p>
<p>I could have made the extension remotely invoke Remy&#8217;s web service, parse the return html and present the result, but it might not be a good option, because: </p>
<ol>
<li>I need it work while off-line (too much distraction online);</li>
<li>HTML entities character set doesn&#8217;t change that often, what&#8217;s the last addition? &euro; maybe?</li>
<li>Overhead from network traffic and CPU cycles parsing html;</li>
<li>Not really a reason though: I could later make use of the new <a href="http://developer.mozilla.org/en/docs/Online/Offline_Events">Online and Offline Events</a> and provide user the options;</li>
</ol>
<p>Update (09/09/2008):<br />
You should be able to have it run on Firefox 3.0.1 and above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yining.org/2007/07/26/html-entity-char-lookup-firefox-extension/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
