<?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>Horn Network &#187; bookmarklet</title>
	<atom:link href="http://klcin.tw/net/tag/bookmarklet/feed" rel="self" type="application/rss+xml" />
	<link>http://klcin.tw/net</link>
	<description>Horn Network (.NET, ASP.NET, C#, VB.NET, JavaScript, Ubuntu, Android ...)</description>
	<lastBuildDate>Fri, 04 Mar 2011 07:25:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>post-Buboo（仿 twitio.us 發文到Buboo）</title>
		<link>http://klcin.tw/net/post-buboo</link>
		<comments>http://klcin.tw/net/post-buboo#comments</comments>
		<pubDate>Fri, 18 Jul 2008 08:46:55 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[PO3]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[Buboo]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/post-buboo</guid>
		<description><![CDATA[網址：http://klcin.tw/ap/po3/post-buboo.php 請收看 Wink 錄影操作示範。 Twitter 有 XDite 混搭 TwitThis 和 Delicious 產生的 twitio.us，很強很好用。 如果你也想要和 twitio.us 類似的功能，可以和在 Buboo 的朋友分享一些新聞或文章，post-Buboo 可以幫你！ post-Buboo 純粹是個人拿來練功夫的小作品，歡迎試用！ 若有任何問題或建議請在此留言，謝謝！]]></description>
			<content:encoded><![CDATA[</p>
<p><a href="http://klcin.tw/net/images/postBubootwitio.usBuboo_EBFF/snap097.png"><img title="post-Buboo" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="225" alt="post-Buboo" src="http://klcin.tw/net/images/postBubootwitio.usBuboo_EBFF/snap097_thumb.png" width="320" border="0" /></a> </p>
<p>網址：<a title="http://klcin.tw/ap/po3/post-buboo.php" href="http://klcin.tw/ap/po3/post-buboo.php">http://klcin.tw/ap/po3/post-buboo.php</a>    <br />請收看 <a href="http://klcin.tw/net/video/post-buboo-opera.htm" target="_blank" rel="gb_page_fs[]">Wink 錄影操作示範</a>。</p>
<p>Twitter 有 <a href="http://blog.xdite.net">XDite</a> 混搭 TwitThis 和 Delicious 產生的 <a href="http://twitio.us/">twitio.us</a>，很強很好用。    <br />如果你也想要和 twitio.us 類似的功能，可以和在 Buboo 的朋友分享一些新聞或文章，<strong>post-Buboo</strong> 可以幫你！</p>
<p> <span id="more-24"></span>
</p>
</p>
</p>
<p>post-Buboo 純粹是個人拿來練功夫的小作品，歡迎試用！   <br />若有任何問題或建議請在此留言，謝謝！</p>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/post-buboo/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>fav-Plurk（偽‧Plurk加星功能！）</title>
		<link>http://klcin.tw/net/fav-plurk</link>
		<comments>http://klcin.tw/net/fav-plurk#comments</comments>
		<pubDate>Fri, 18 Jul 2008 07:46:38 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[PO3]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[Buboo]]></category>
		<category><![CDATA[Plurk]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/fav-plurk</guid>
		<description><![CDATA[網址：http://klcin.tw/ap/po3/fav-plurk.php 請收看 Wink 錄影操作示範。 在 Plurk 上看到好文是不是也想加星收藏呢？可惜目前官方尚未實作出類似的功能。 沒關係，fav-Plurk 可以幫你把好文收到巴布&#160; (Buboo) 或推特 (Twitter)！ fav-Plurk 純粹是個人拿來練功夫的小作品，歡迎試用！ 若有任何問題或建議請在此留言，謝謝！]]></description>
			<content:encoded><![CDATA[<p><a href="http://klcin.tw/net/images/favPlurkPlurk_DDDE/snap098.png"><img title="fav-Plurk" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="235" alt="fav-Plurk" src="http://klcin.tw/net/images/favPlurkPlurk_DDDE/snap098_thumb.png" width="320" border="0" /></a> </p>
<p>網址：<a title="http://klcin.tw/ap/po3/fav-plurk.php" href="http://klcin.tw/ap/po3/fav-plurk.php">http://klcin.tw/ap/po3/fav-plurk.php</a>     <br />請收看 <a href="http://klcin.tw/net/video/fav-plurk-opera.htm" target="_blank" rel="gb_page_fs[]">Wink 錄影操作示範</a>。</p>
<p>在 <a href="http://www.plurk.com" target="_blank">Plurk</a> 上看到好文是不是也想加星收藏呢？可惜目前官方尚未實作出類似的功能。    <br />沒關係，fav-Plurk 可以幫你把好文收到巴布&#160; (Buboo) 或推特 (Twitter)！</p>
<p> <span id="more-23"></span>
<p>fav-Plurk 純粹是個人拿來練功夫的小作品，歡迎試用！   <br />若有任何問題或建議請在此留言，謝謝！</p>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/fav-plurk/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bookmarklet 的小技巧</title>
		<link>http://klcin.tw/net/bookmarklet</link>
		<comments>http://klcin.tw/net/bookmarklet#comments</comments>
		<pubDate>Fri, 11 Jul 2008 08:30:51 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[Bookmarklet]]></category>
		<category><![CDATA[bookmarklet]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/?p=13</guid>
		<description><![CDATA[簡介 Wikipedia : http://en.wikipedia.org/wiki/Bookmarklet A bookmarklet is an applet, a small computer application, stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. The term is a portmanteau of the terms bookmark and applet. Bookmarklet，就是存放在書籤(Firefox, Opera)或我的最愛(IE)的 javascript 小程式。 運用 有些現成實用的 bookmarklet 可以參考「電腦玩物: Bookmarklets放在書籤裡的實用瀏覽器小工具補完列表」的詳細介紹。 安裝 Firefox 直接將[範例]拖曳到「書籤工具列」即可。 [...]]]></description>
			<content:encoded><![CDATA[<h2>簡介 </h2>
<blockquote><p>Wikipedia : <a title="http://en.wikipedia.org/wiki/Bookmarklet" href="http://en.wikipedia.org/wiki/Bookmarklet">http://en.wikipedia.org/wiki/Bookmarklet</a>       <br />A <b>bookmarklet</b> is an <a href="http://en.wikipedia.org/wiki/Applet">applet</a>, a small computer application, stored as the <a href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator">URL</a> of a <a href="http://en.wikipedia.org/wiki/Internet_bookmark">bookmark</a> in a <a href="http://en.wikipedia.org/wiki/Web_browser">web browser</a> or as a <a href="http://en.wikipedia.org/wiki/Hyperlink">hyperlink</a> on a <a href="http://en.wikipedia.org/wiki/Web_page">web page</a>. The term is a <a href="http://en.wikipedia.org/wiki/Portmanteau">portmanteau</a> of the terms <i>bookmark</i> and <i>applet</i>.</p>
</blockquote>
<p>Bookmarklet，就是存放在書籤(Firefox, Opera)或我的最愛(IE)的 javascript 小程式。 </p>
<h2>運用</h2>
<p>有些現成實用的 bookmarklet 可以參考「<a href="http://gfw.appspot.com/playpcesor/2007/10/bookmarklets.html" target="_blank">電腦玩物: Bookmarklets放在書籤裡的實用瀏覽器小工具補完列表</a>」的詳細介紹。</p>
<p> <span id="more-13"></span><br />
<h2>安裝</h2>
<ul>
<li>Firefox      <br />直接將[範例]拖曳到「書籤工具列」即可。 </li>
<li>IE      <br />在[範例]點滑鼠右鍵，選擇「加到我的最愛」，會出現安全性警訊：「您正在新增一個可能並不安全的我的最愛。要繼續嗎？」選是即可。 </li>
<li>Opera      <br />在[範例]點滑鼠右鍵，選擇「將連結加入書籤」 </li>
</ul>
<h2>型式</h2>
<p>開頭一定是「<strong>javascript:</strong>」</p>
<h3>簡單型</h3>
<ul>
<li><a href="javascript:alert(document.cookie)" target="_blank">javascript:alert(document.cookie)</a>：顯示當前網站的cookie資訊 </li>
</ul>
<h3>函式型</h3>
<ul>
<li><a title="javascript:void(location.href=&#39;http://tinyurl.com/create.php?url=&#39;+location.href)" href="javascript:void(location.href='http://tinyurl.com/create.php?url='+location.href)">javascript:<strong><font color="#ff0000">void(</font></strong>location.href=&#8217;http://tinyurl.com/create.php?url=&#8217;+location.href<strong><font color="#ff0000">)</font></strong></a> ：取得當前網址的tinyurl。 </li>
<li><a title="javascript:(function(){location.href=&#39;http://tinyurl.com/create.php?url=&#39;+location.href})()" href="javascript:(function(){location.href='http://tinyurl.com/create.php?url='+location.href})()">javascript:<font color="#ff0000"><strong>(function(){</strong></font>location.href=&#8217;http://tinyurl.com/create.php?url=&#8217;+location.href<strong><font color="#ff0000">})()</font></strong></a> ：取得當前網址的tinyurl。 </li>
</ul>
<h2>技巧</h2>
<h3>物件別名</h3>
<p>以下程式片段可自動判別瀏覽器並取得使用者已選取的文字。</p>
<p>
<pre class="brush: javascript">var selected = &#039;&#039;;
if ( window.getSelection )
	selected=window.getSelection();
else if ( document.getSelection )
	selected=document.getSelection();
else if ( document.selection )
	selected = document.selection.createRange().text;</pre>
</p>
<p>別名精簡後</p>
<p>
<pre class="brush: javascript">S=&#039;&#039;;
w=window;
d=document;
if(w.getSelection)S=w.getSelection();
else if(d.getSelection)S=d.getSelection();
else if(d.selection)S=d.selection.createRange().text;</pre>
</p>
<h3>方法別名</h3>
<p>以下程式片段可自動填入帳號密碼登入。</p>
<p>
<pre class="brush: javascript">document.getElementById(&#039;uid&#039;).value=&#039;aaa&#039;;
document.getElementById(&#039;pwd&#039;).value=&#039;xxx&#039;;
document.getElementById(&#039;logon&#039;).click();</pre>
</p>
<p>別名精簡後</p>
<p>
<pre class="brush: javascript">$=document.getElementById;
$(&#039;uid&#039;).value=&#039;aaa&#039;;
$(&#039;pwd&#039;).value=&#039;xxx&#039;;
$(&#039;logon&#039;).click();</pre>
</p>
<h3>其它</h3>
<ul>
<li>在URL中傳遞文字最好用 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Functions:encodeURIComponent" target="_blank">encodeURIComponent</a> 處理過。</li>
<li>程式碼中的空格要用 <strong>%20 </strong>取代。</li>
<li>開啟新視窗 window.open</li>
<li>計時器 setTimeout</li>
<li><strong>小幫手：</strong><a href="http://subsimple.com/bookmarklets/jsbuilder.htm" target="_blank"><strong>Bookmarklet Builder</strong></a>。可以幫忙縮排程式碼。</li>
</ul>
<h2>取得網頁資訊</h2>
<ul>
<li>網址：location.href </li>
<li>標題： document.title.replace(/^s*|s*$/g,&quot;&quot;)||&quot;&quot;&#160; （去掉頭尾的空白）</li>
</ul>
<h2>綜合運用</h2>
<p>模仿 twitio.us 將目前在看的網頁發送到 twitter，改成發送到 buboo 並可帶出使用者已選取的文字內容。[<a href="http://klcin.tw/ap/po3/post-buboo.php" target="_blank">線上展示</a>]</p>
<p>
<pre class="brush: javascript">javascript:
(function(){
  d=document;
  w=window;
  F=encodeURIComponent;
  S=d.selection.createRange().text;
  T=d.title.replace(/^s*|s*$/g,&quot;&quot;)||&quot;&quot;;
  U=&quot;http://klcin.tw/ap/po3/post-buboo.php?url=&quot;+F(location.href)+&quot;&amp;title=&quot;+F(T)+&quot;&amp;excerpt=&quot;+F(S);
  w.open(U,&quot;postBuboo&quot;,&quot;width=600,height=500,location,status,scrollbars,resizable,dependent=yes&quot;);
  setTimeout(&quot;postBuboo.focus()&quot;);
}
)()
</pre>
</p>
<h4>延伸閱讀</h4>
<ul>
<li><a href="http://www.whatwoulddrupaldo.org/how-to-create-a-bookmarklet-0" target="_blank">How To Create A Bookmarklet | What Would Drupal Do?</a></li>
<li><a href="http://www.appinn.com/bookmarklet/" target="_blank">Bookmarklet &#8211; 小书签，实用浏览器小工具补完 | 小众软件 – Appinn</a></li>
<li><a href="http://ccca.nctu.edu.tw/~hlb/articles/archives/000029.php" target="_blank">hlb&#8217;s articles: Bookmarklet</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/bookmarklet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

