<?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>梁剑的Blog &#187; greasemonkey</title>
	<atom:link href="http://icomes.net/tag/greasemonkey/feed/" rel="self" type="application/rss+xml" />
	<link>http://icomes.net</link>
	<description>做有趣的事，做有用的人</description>
	<lastBuildDate>Wed, 23 Jun 2010 16:04:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>新版阅读空间的UserScript</title>
		<link>http://icomes.net/2009/12/05/%e6%96%b0%e7%89%88%e9%98%85%e8%af%bb%e7%a9%ba%e9%97%b4%e7%9a%84userscript/</link>
		<comments>http://icomes.net/2009/12/05/%e6%96%b0%e7%89%88%e9%98%85%e8%af%bb%e7%a9%ba%e9%97%b4%e7%9a%84userscript/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 16:41:16 +0000</pubDate>
		<dc:creator>梁剑</dc:creator>
				<category><![CDATA[默认分类]]></category>
		<category><![CDATA[greasemonkey]]></category>

		<guid isPermaLink="false">http://icomes.net/?p=472</guid>
		<description><![CDATA[用了JQuery，实在很方便。
但是很奇怪，评论小数字的click只有在展开了之后才会响应，路过的JS高手帮忙解释一下啊：）
已经上传到userscript.org，id63440，希望可以尽快修正上面提到的问题。

// ==UserScript==
// @name           QQMail Broadcast
// @namespace      QMBC
// @description    UI &#38; Functional Improvement for Broadcast
// @include        http://*.mail.qq.com/cgi-bin/reader_article_list*
// ==/UserScript==
&#160;
// Add jQuery
var GM_JQ = document.createElement&#40;'script'&#41;;
GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
GM_JQ.type = 'text/javascript';
document.getElementsByTagName&#40;'head'&#41;&#91;0&#93;.appendChild&#40;GM_JQ&#41;;
&#160;
// Check if jQuery's loaded
function [...]]]></description>
			<content:encoded><![CDATA[<p>用了JQuery，实在很方便。<br />
但是很奇怪，评论小数字的click只有在展开了之后才会响应，路过的JS高手帮忙解释一下啊：）<br />
已经上传到userscript.org，id<a target="_blank" href="http://userscripts.org/scripts/show/63440">63440</a>，希望可以尽快修正上面提到的问题。</p>

<div class="wp_syntax"><div 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           QQMail Broadcast</span>
<span style="color: #006600; font-style: italic;">// @namespace      QMBC</span>
<span style="color: #006600; font-style: italic;">// @description    UI &amp; Functional Improvement for Broadcast</span>
<span style="color: #006600; font-style: italic;">// @include        http://*.mail.qq.com/cgi-bin/reader_article_list*</span>
<span style="color: #006600; font-style: italic;">// ==/UserScript==</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Add jQuery</span>
<span style="color: #003366; font-weight: bold;">var</span> GM_JQ <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
GM_JQ.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://jquery.com/src/jquery-latest.js'</span><span style="color: #339933;">;</span>
GM_JQ.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>
document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>GM_JQ<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Check if jQuery's loaded</span>
<span style="color: #003366; font-weight: bold;">function</span> GM_wait<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> unsafeWindow.<span style="color: #660066;">jQuery</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> window.<span style="color: #660066;">setTimeout</span><span style="color: #009900;">&#40;</span>GM_wait<span style="color: #339933;">,</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> $ <span style="color: #339933;">=</span> unsafeWindow.<span style="color: #660066;">jQuery</span><span style="color: #339933;">;</span> letsJQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
GM_wait<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> letsJQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</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> _div <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;div style='float: right;'&gt;&lt;/div&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> _readMode <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;a&gt;Read Mode&lt;/a&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		_readMode.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;click&quot;</span><span style="color: #339933;">,</span> ReadMode<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		_div.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>_readMode<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;span&gt;|&lt;/span&gt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;margin&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;10px&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span>_div<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> _commentMode <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;a&gt;Comment Mode&lt;/a&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		_commentMode.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;click&quot;</span><span style="color: #339933;">,</span> CommentMode<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		_div.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>_commentMode<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#articlecontent&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">prepend</span><span style="color: #009900;">&#40;</span>_div<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> ReadMode<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div.update a[id^=artTitle_]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> CommentMode<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> links <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div.postInfo a[id^=artCommentListLink]:visible&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	links.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://icomes.net/2009/12/05/%e6%96%b0%e7%89%88%e9%98%85%e8%af%bb%e7%a9%ba%e9%97%b4%e7%9a%84userscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>阅读空间的GM脚本</title>
		<link>http://icomes.net/2009/01/17/%e9%98%85%e8%af%bb%e7%a9%ba%e9%97%b4%e7%9a%84gs%e8%84%9a%e6%9c%ac/</link>
		<comments>http://icomes.net/2009/01/17/%e9%98%85%e8%af%bb%e7%a9%ba%e9%97%b4%e7%9a%84gs%e8%84%9a%e6%9c%ac/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 03:05:49 +0000</pubDate>
		<dc:creator>梁剑</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[技术笔记]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[qqmail]]></category>
		<category><![CDATA[reader]]></category>

		<guid isPermaLink="false">http://icomes.net/?p=265</guid>
		<description><![CDATA[Google Reader有462个GM脚本（GreaseFire的结果），而整个qq.com的域名只有一个，是用来优化qq.com的打印功能的。
这样的对比反映出了Geek们对两个域名的认同差异吧。
早上起床，写了一个用于用于阅读空间GS脚本。
just for fun啦，主要功能是在阅读时改变背景色，因为感觉现在的色彩有点单调。
已经上传到userscrips，可以在这里找到。
效果图：)

可惜Qzone对Firefox的支持还不好，否则也可以做一个：）
出去晒太阳了～～～
]]></description>
			<content:encoded><![CDATA[<p>Google Reader有462个GM脚本（GreaseFire的结果），而整个qq.com的域名只有一个，是用来优化qq.com的打印功能的。<br />
这样的对比反映出了Geek们对两个域名的认同差异吧。</p>
<p>早上起床，写了一个用于用于阅读空间GS脚本。<br />
just for fun啦，主要功能是在阅读时改变背景色，因为感觉现在的色彩有点单调。</p>
<p>已经上传到userscrips，可以在<a title="QQ Mail User Script" href="http://userscripts.org/scripts/show/40618" target="_blank">这里</a>找到。</p>
<p>效果图：)<br />
<img class="size-medium wp-image-267" title="qqmail_reader_list" src="http://icomes.net/wp-content/uploads/2009/01/qqmail_reader_list-300x180.png" alt="阅读空间" width="300" height="180" /></p>
<p>可惜Qzone对Firefox的支持还不好，否则也可以做一个：）</p>
<p>出去晒太阳了～～～</p>
]]></content:encoded>
			<wfw:commentRss>http://icomes.net/2009/01/17/%e9%98%85%e8%af%bb%e7%a9%ba%e9%97%b4%e7%9a%84gs%e8%84%9a%e6%9c%ac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GreaseMonkey不支持onEvent?</title>
		<link>http://icomes.net/2009/01/16/greasemonkey%e4%b8%8d%e6%94%af%e6%8c%81onevent/</link>
		<comments>http://icomes.net/2009/01/16/greasemonkey%e4%b8%8d%e6%94%af%e6%8c%81onevent/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 15:56:27 +0000</pubDate>
		<dc:creator>梁剑</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[技术笔记]]></category>
		<category><![CDATA[greasemonkey]]></category>

		<guid isPermaLink="false">http://icomes.net/?p=261</guid>
		<description><![CDATA[如果用obj.onclick = function(){&#8230;}，
则脚本会异常终止。
改用addEventListener(&#8220;click&#8221;, function(){&#8230;}, true)，
则一切正常。
]]></description>
			<content:encoded><![CDATA[<p>如果用obj.onclick = function(){&#8230;}，<br />
则脚本会异常终止。<br />
改用addEventListener(&#8220;click&#8221;, function(){&#8230;}, true)，<br />
则一切正常。</p>
]]></content:encoded>
			<wfw:commentRss>http://icomes.net/2009/01/16/greasemonkey%e4%b8%8d%e6%94%af%e6%8c%81onevent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
