<?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>Scott Yang's Playground &#187; Javascript</title>
	<atom:link href="http://scott.yang.id.au/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.yang.id.au</link>
	<description>Faith, Technology and Randomness in Life, According to Scott</description>
	<lastBuildDate>Thu, 09 Feb 2012 09:01:12 +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>SocialHistory.js &#8211; Potential Privacy Concerns</title>
		<link>http://scott.yang.id.au/2008/05/socialhistoryjs-potential-privacy-concerns/</link>
		<comments>http://scott.yang.id.au/2008/05/socialhistoryjs-potential-privacy-concerns/#comments</comments>
		<pubDate>Thu, 29 May 2008 13:07:13 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/?p=1746</guid>
		<description><![CDATA[Via ReadWriteWeb: SocialHistory.js can detect what popular social networks your visitors have recently visited by (1) creating a small hiden iframe (2) populate the iframe with links to those social networks (3) check the colours of those links, as visited links will usually have a different colour. One of the most wicked hack I have [...]]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://www.readwriteweb.com/archives/socialhistoryjs_see_which_site.php">ReadWriteWeb</a>: <a href="http://azarask.in/blog/post/socialhistoryjs/">SocialHistory.js</a> can detect what popular social networks your visitors have recently visited by (1) creating a small hiden iframe (2) populate the iframe with links to those social networks (3) check the colours of those links, as visited links will usually have a different colour. One of the most wicked hack I have seen this year and I can already think of a dozen evil modifications that you can do to this script.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2008/05/socialhistoryjs-potential-privacy-concerns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Threading in Javascript</title>
		<link>http://scott.yang.id.au/2007/02/threading-in-javascript/</link>
		<comments>http://scott.yang.id.au/2007/02/threading-in-javascript/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 05:37:53 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2007/02/threading-in-javascript/</guid>
		<description><![CDATA[Cooperative threading in Javascript 1.7 using the new yield keyword. Only works in Firefox 2 (or whatever browser that supports JS 1.7 with all its Pythonic features). It&#8217;s no preemptive &#8220;real&#8221; threading though, but it does make massive parallelism easier to implement. Online realtime strategy game written in Javascript?]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.neilmix.com/2007/02/07/threading-in-javascript-17/">Cooperative threading in Javascript 1.7 using the new <code>yield</code> keyword</a>. Only works in Firefox 2 (or whatever browser that supports JS 1.7 with all its Pythonic features). It&#8217;s no preemptive &#8220;real&#8221; threading though, but it does make massive parallelism easier to implement. Online realtime strategy game written in Javascript?</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2007/02/threading-in-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Search Engine Highlight Javascript 1.5</title>
		<link>http://scott.yang.id.au/2006/12/search-engine-highlight-javascript-15/</link>
		<comments>http://scott.yang.id.au/2006/12/search-engine-highlight-javascript-15/#comments</comments>
		<pubDate>Fri, 08 Dec 2006 02:06:14 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[SE-Hilite]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/12/search-engine-highlight-javascript-15/</guid>
		<description><![CDATA[It has been almost a year since the last update (way too busy at the moment), but here you are &#8212; a new version of Search Engine Highlight Javascript for your websites. What is in this change: More search engines are supported. Added MSN Live, Technorati and Dogpile. Add the framework for search engines that [...]]]></description>
			<content:encoded><![CDATA[<p>It has been almost a year since the last update (way too busy at the moment), but here you are &#8212; a new version of <a href="http://scott.yang.id.au/code/se-hilite/">Search Engine Highlight</a> Javascript for your websites. What is in this change:</p>
<ul>
<li>More search engines are supported. Added <a href="http://search.live.com/">MSN Live</a>, <a href="http://www.technorati.com/">Technorati</a> and <a href="http://www.dogpile.com/">Dogpile</a>.</li>
<li>Add the framework for search engines that don&#8217;t use query string, i.e. Technorati, Dogpile and many others.</li>
<li>Fix up an issue with <code>Hilite.style_name_suffix = false</code>.</li>
</ul>
<p>It has also been tested on IE7, FF2 and Opera9. Go to the <a href="http://scott.yang.id.au/code/se-hilite/">project page</a> and download either the zipped file or the raw JS from my SVN repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/12/search-engine-highlight-javascript-15/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>ESV Popup 1.2 Released</title>
		<link>http://scott.yang.id.au/2006/11/esv-popup-12-released/</link>
		<comments>http://scott.yang.id.au/2006/11/esv-popup-12-released/#comments</comments>
		<pubDate>Mon, 13 Nov 2006 06:38:22 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ESV Popup]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/11/esv-popup-12-released/</guid>
		<description><![CDATA[I have just committed a small update to ESV Popup Javascript, resolving an issue where Good News Publisher generated Javascript is cached by Internet Explorer 6/7, which prevents the passage shown in the popup to be updated. I&#8217;ve also fixed a few stylesheet glitches with Internet Explorer 7.]]></description>
			<content:encoded><![CDATA[<p>I have just committed a small update to <a href="http://scott.yang.id.au/code/esvpopup/">ESV Popup Javascript</a>, resolving an issue where Good News Publisher generated Javascript is cached by Internet Explorer 6/7, which prevents the passage shown in the popup to be updated.</p>
<p>I&#8217;ve also fixed a few stylesheet glitches with Internet Explorer 7.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/11/esv-popup-12-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>COWS not much an Ajax</title>
		<link>http://scott.yang.id.au/2006/09/cows-not-much-an-ajax/</link>
		<comments>http://scott.yang.id.au/2006/09/cows-not-much-an-ajax/#comments</comments>
		<pubDate>Tue, 05 Sep 2006 21:55:06 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/09/cows-not-much-an-ajax/</guid>
		<description><![CDATA[Saw it on Slashdot yesterday, where COWS Ajax was introduced. What is COWS first of all: Ajax has been revolutionizing the web. However it is greatly limited by the browser same-origin policy, meaning that your site can only be as good as the web applications and tools that you create. But there&#8217;s a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>Saw it on <a href="http://developers.slashdot.org/article.pl?sid=06/09/04/1738240">Slashdot</a> yesterday, where <a href="http://cows-ajax.sourceforge.net/">COWS Ajax</a> was introduced. What is COWS first of all:</p>
<blockquote><p>Ajax has been revolutionizing the web. However it is greatly limited by the browser same-origin policy, meaning that your site can only be as good as the web applications and tools that you create. But there&#8217;s a lot of great tools out there, wouldn&#8217;t it be nice to tap into them? Changeable Origin Web Services &#8212; COWS &#8212; Ajax breaks down this barrier.</p></blockquote>
<p>It argues that &#8220;traditionally&#8221; Ajax, which utilises <code>XmlHttpRequest</code> object to perform asynchronised HTTP requests, has one problem &#8212; which was actually a <a href="http://en.wikipedia.org/wiki/Same_origin_policy">security policy</a>. The way to solve this &#8220;problem&#8221; is by using its COWS Ajax mechanism which allows web services from hosts other than the origin of the page to be performed.</p>
<p>Behind the scene is actually quite simple. In order to invoke a web service on a different domain, the COWS API does:</p>
<ol>
<li>Create a <code>&lt;SCRIPT/&gt;</code> DOM element.</li>
<li>Point the <code>src</code> attribute to a remote Javascript.</li>
<li>Append the <code>&lt;SCRIPT/&gt;</code> DOM element to <code>&lt;HEAD/&gt;</code>.</li>
<li>Javascript code returned from a remote domain will then call a predefined handler, and then remove the <code>&lt;SCRIPT/&gt;</code> from <code>&lt;HEAD/&gt;</code>.</li>
</ol>
<p>Sounds exactly like how many complicated bookmarklets work. My old Google video download script works the same way. Besides security issues due to trust, there is really nothing new. In fact, I won&#8217;t even consider it as &#8220;Ajax&#8221;. What is Ajax then?</p>
<dl>
<dt><strong>A</strong>synchronised</dt>
<dd>In Ajax applications, you hand in your handler to be called back when the HTTP request completes. In COWS, there is no guarantee that your callback will be called. A Javascript file is returned by remote service and is evaluated by the browser, and at its mercy your response callback <em>might</em> be called. Your error callback is only called by constantly polling the system.</dd>
<dt><strong>J</strong>avascript</dt>
<dd>Well, it <strong>is</strong> in Javascript and I won&#8217;t argue that.</dd>
<dt><strong>A</strong>and</dt>
<dd>And?</dd>
<dt><strong>X</strong>XML</dt>
<dd>The result of the web service is not XML. Nor JSON. In fact it is full on Javascript code that will be evaluated by your browser <strong>before</strong> the evaluated code calls your handler.</dd>
</dl>
<p>I personally don&#8217;t think COWS has resolved any issue that has already been addressed. Nor is it a savour to Ajax &#8212; it is far more limiting than the &#8220;traditional&#8221; <code>XmlHttpRequest</code> style Ajax. There is however much market-speak on COWS&#8217; website:</p>
<blockquote><p>And in exchange for making the cool apps, the application host can create branding, drive traffic, or employ serveral revenue streams. Everyone wins! In this case, the cow coming home is the cash cow ;-)</p></blockquote>
<p>You need much much more than COWS to create a cool app, and you need much much more than a cool app to bring in the cash. Meanwhile, COWS just sounds like bull to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/09/cows-not-much-an-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Client Side Port Scanning with Javascript</title>
		<link>http://scott.yang.id.au/2006/08/client-side-port-scanning-with-javascript/</link>
		<comments>http://scott.yang.id.au/2006/08/client-side-port-scanning-with-javascript/#comments</comments>
		<pubDate>Mon, 14 Aug 2006 00:11:50 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/08/client-side-port-scanning-with-javascript/</guid>
		<description><![CDATA[Prrof of concept of port scanning arbitary IP addresses from nothing but client side Javascript. From the code it looks like creating IFRAMEs and setting the SRC attribute to try to connect to ports, and has a list of web server signatures to check against. Pretty scary in what client side JS can do. I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.spidynamics.com/spilabs/js-port-scan/">Prrof of concept of port scanning arbitary IP addresses from nothing but client side Javascript</a>. From the code it looks like creating IFRAMEs and setting the SRC attribute to try to connect to ports, and has a list of web server signatures to check against. Pretty scary in what client side JS can do. I think I&#8217;ll keep on surfing in <a href="http://w3m.sourceforge.net/">w3m</a> and skip all Ajax goodies. Via <a href="http://www.twit.tv/sn52">Security Now</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/08/client-side-port-scanning-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo! User Interface Library</title>
		<link>http://scott.yang.id.au/2006/02/yahoo-user-interface-library/</link>
		<comments>http://scott.yang.id.au/2006/02/yahoo-user-interface-library/#comments</comments>
		<pubDate>Wed, 15 Feb 2006 01:01:06 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/yahoo-user-interface-library/</guid>
		<description><![CDATA[Yahoo! UI Library, recently released by Yahoo! under BSD license, is quite a shining piece of web development toolkit. It has all the nifty Javascript utility functions/classes to build your next Web 2.0 application, in a similar fashion to other toolkits like Script.aculo.us or Rico, but backed by one of the largest company on the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.yahoo.net/yui/">Yahoo! UI Library</a>, recently <a href="http://yuiblog.com/blog/2006/02/13/the-yahoo-user-interface-library/">released</a> by <a href="http://www.yahoo.com/">Yahoo!</a> under <a href="http://developer.yahoo.net/yui/license.txt">BSD license</a>, is quite a shining piece of web development toolkit. It has all the nifty Javascript utility functions/classes to build your next Web 2.0 application, in a similar fashion to other toolkits like <a href="http://script.aculo.us/">Script.aculo.us</a> or <a href="http://openrico.org/">Rico</a>, but backed by one of the largest company on the web.</p>
<blockquote><p>The Yahoo! User Interface Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, HTML and AJAX. The UI Library Utilities facilitate the implementation of rich client-side features by enhancing and normalizing the developer&#8217;s interface to important elements of the browser infrastructure (such as events, in-page HTTP requests and the DOM). The Yahoo UI Library Controls produce visual, interactive user interface elements on the page with just a few lines of code and an included CSS file. All the components in the Yahoo! User Interface Library have been released as open source under a BSD license and are free for all uses.</p></blockquote>
<p>Good thing about corporate-backed open source library is that it is very usable right from the beginning. In fact, according to <a href="http://yuiblog.com/">Yahoo! User Interface Blog</a>, the UI library was started almost one year ago before released to the public. It is also functional &#8212; AJAX, DOM, animation effect, drag &#8216;n&#8217; drop, and a cross-browser event model, plus a few ready-made Javascript widgets like <a href="http://developer.yahoo.net/yui/calendar/">calendar</a> and <a href="http://developer.yahoo.net/yui/treeview/">tree view</a>. Moreover, Yahoo has a guideline on its <a href="http://developer.yahoo.net/yui/articles/gbs/gbs.html">graded browser support</a>, including <a href="http://developer.yahoo.net/yui/articles/gbs/gbs_browser-chart.html">who are they committed to support</a> (currently IE 5.5+, FF 1+ and Safari 1.3+).</p>
<p>Neat. If you can stand <code>YAHOO</code> Javascript namespace all over your code :)</p>
<p>However when you look around at what has already been done by other OSS libraries, YUI doesn&#8217;t really add anything that is extra-ordinary special. Yes &#8212; it has good clear defined cross browser support. Yes &#8212; it has useful documentation. But is there anything new? YUI is on the &#8220;fat&#8221; side of the library in comparison to libraries like Scriput.aculo.us, but it is not &#8220;fat enough&#8221; to provide all the web gizmo a web developer wants (I want a tree/list control that emulates XUL&#8217;s Tree control, thanks!). Hopefully more UI components are in the making.</p>
<p>Also with some of the examples I have looked at, I found it still lacks user accessibility from developers&#8217; point of view, i.e. it is not that developer friendly. For example, the <a href="http://developer.yahoo.net/yui/connection/">Connection Manager</a> library that does cross-browser XMLHttpRequest. Instead of performing operations on the object returned by <code>asyncRequest()</code>, you need to keep on typing in <code>YAHOO.util.Connection...</code> to check status, abort requests, etc. The same can be said about other libraries &#8212; there are just way too much typing.</p>
<p>The question is, why is Yahoo releasing their UI library for free? One thing for sure is, since Javascript is sent to the browser in unobfuscated clear text, those who are interested in &#8220;how Yahoo! does it&#8221; would have &#8220;stole&#8221; the code anyway. It can&#8217;t be Yahoo that wants to spur up the development using the open source model, otherwise other license will be used instead of BSD, where contributing back modifications is not even required.</p>
<p>As far I can see, it is just a <em>stunt</em>. Yahoo! released a well-documented open source Javascript library, so we should all classify them as the &#8220;Good Guys&#8221;. Especially in the view of recent Google-related events, who &#8220;helped&#8221; ruthless Chinese government <em>oppressing</em> innocent Internet users. This move will surely win the hearts of many freedom-loving open source geeks.&lt;/sacarsm&gt; :)</p>
<p>Honestly, I believe many other open source projects (or even commercial proprietary projects) will benefit from Yahoo! UI because it is indeed a high quality (though a bit awkward) piece of library.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/02/yahoo-user-interface-library/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google Video Downloader Bookmarklet 0.1</title>
		<link>http://scott.yang.id.au/2005/11/google-video-downloader-bookmarklet-01/</link>
		<comments>http://scott.yang.id.au/2005/11/google-video-downloader-bookmarklet-01/#comments</comments>
		<pubDate>Mon, 07 Nov 2005 03:12:01 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/11/google-video-downloader-bookmarklet-01/</guid>
		<description><![CDATA[I love Google Video Search &#8212; great way to waste your evening and plenty of bandwidth. However, I hate to watch video on a Flash player embeded inside a web browser window. I also hate to download the same video again and again every time I want to watch it. So yesterday evening I hacked [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://video.google.com/">Google Video Search</a> &#8212; great way to waste your evening and plenty of bandwidth. However, I hate to watch video on a Flash player embeded inside a web browser window. I also hate to download the same video again and again every time I want to watch it.</p>
<p>So yesterday evening I hacked this Javascript, <a href="http://scott.yang.id.au/code/google-video-bookmarklet/">Google Video Downloader Bookmarklet</a>, to automatically reveal the actual URL of the Flash Video, and provide one click download to save it on my hard disk, so I can recompress them with <a href="http://www.xvid.org/">Xvid</a> to watch on my Dell Axim v50.</p>
<p>Hopefully it will be useful for others as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/11/google-video-downloader-bookmarklet-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripturizer for Javascript Bookmarklet</title>
		<link>http://scott.yang.id.au/2005/10/scripturizer-for-javascript-bookmarklet/</link>
		<comments>http://scott.yang.id.au/2005/10/scripturizer-for-javascript-bookmarklet/#comments</comments>
		<pubDate>Fri, 07 Oct 2005 01:43:38 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bookmarklet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripturizer]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/10/scripturizer-for-javascript-bookmarklet/</guid>
		<description><![CDATA[This idea is actually implemented after Glen&#8217;s comment on a possible Greasemonkey plugin. Instead of re-bundling Scripturizer for Javascript into a Greasemonkey user-script, where very limit number of users might give it a try, I have made it into a &#8220;bookmarklet&#8221; instead, where clicking on a button can scripturize any webpage that you are currently [...]]]></description>
			<content:encoded><![CDATA[<p>This idea is actually implemented after <a href="http://scott.yang.id.au/code/scripturizer-js/?comment-29">Glen&#8217;s comment</a> on a possible Greasemonkey plugin. Instead of re-bundling <a href="http://scott.yang.id.au/code/scripturizer-js/">Scripturizer for Javascript</a> into a Greasemonkey user-script, where very limit number of users might give it a try, I have made it into a &#8220;bookmarklet&#8221; instead, where clicking on a button can scripturize any webpage that you are currently looking at.</p>
<p>Taken from the <a href="http://scott.yang.id.au/code/scripturizer-js/?toc-bookmarklet">bookmarklet section</a> of the Scripturizer page:</p>
<blockquote><p>
  You are not only able to hyperlink Bible references on your own website, you can now also scripturize other websites! Even been to a website where the webmaster just forgot to provide links for passages to the text (like I usually do)? The Scripturizer bookmarklet is here to provide the fix.
</p></blockquote>
<p>Bookmark it! And <strong>Scripturize It!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/10/scripturizer-for-javascript-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripturizer and ESV Popup have moved!</title>
		<link>http://scott.yang.id.au/2005/10/scripturizer-and-esv-popup-have-moved/</link>
		<comments>http://scott.yang.id.au/2005/10/scripturizer-and-esv-popup-have-moved/#comments</comments>
		<pubDate>Thu, 06 Oct 2005 05:19:29 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Scripturizer]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/10/scripturizer-and-esv-popup-have-moved/</guid>
		<description><![CDATA[I have released the latest version of Scripturizer for Javascript and ESV Popup on FuCoder.com, my current programming/Internet blog. The new version is almost a complete re-write that walks through DOM tree instead of searching and replacing in innerHTML. I will also gradually migrate my other projects over &#8212; whenever I have more time working [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fucoder.com/2005/10/scripturizer-js-2/">I have released the latest version of Scripturizer for Javascript and ESV Popup</a> on <a href="http://fucoder.com/">FuCoder.com</a>, my current programming/Internet blog. The new version is almost a complete re-write that walks through DOM tree instead of searching and replacing in innerHTML. I will also gradually migrate my other projects over &#8212; whenever I have more time working on them.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/10/scripturizer-and-esv-popup-have-moved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripturizer for Javascript 2.0 and ESV Popup 1.1</title>
		<link>http://scott.yang.id.au/2005/10/scripturizer-js-2/</link>
		<comments>http://scott.yang.id.au/2005/10/scripturizer-js-2/#comments</comments>
		<pubDate>Thu, 06 Oct 2005 05:14:35 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ESV Popup]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Scripturizer]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/10/scripturizer-js-2/</guid>
		<description><![CDATA[Today I have migrated Scripturizer for Javascript and ESV Popup from my personal blogsite to FuCoder.com, and have updated them with the latest changes that I have been working on. Scripturizer for Javascript 2.0 Almost a complete re-write. Instead of searching and replacing innerHTML with regular expression, I have made a DOM walker to create [...]]]></description>
			<content:encoded><![CDATA[<p>Today I have migrated <a href="http://scott.yang.id.au/code/scripturizer-js/">Scripturizer for Javascript</a> and <a href="http://scott.yang.id.au/code/esvpopup/">ESV Popup</a> from my <a href="http://scott.yang.id.au/">personal blogsite</a> to FuCoder.com, and have updated them with the latest changes that I have been working on.</p>
<p><strong>Scripturizer for Javascript</strong> 2.0</p>
<ul>
<li>Almost a complete re-write. Instead of searching and replacing innerHTML with regular expression, I have made a DOM walker to create DOM elements and text nodes in places of Bible references. It runs faster on MSIE, and pauses every 500 nodes parsed to make UI more responsible on large documents.</li>
<li>Link URL generation is now done on the fly &#8212; so you can change Scripturizer&#8217;s parameter on a parsed document, and the new parameter will still be used. See example on <a href="http://scott.yang.id.au/wp-content/scripturizer/scripturizer-test.html">testing page</a> by changing the Bible translation.</li>
<li>Fully tested on Safari 1.2.x on Mac OS X.3 and Opera 8.5 on Windows.</li>
</ul>
<p><strong>ESV Popup</strong> 1.1</p>
<ul>
<li>Better MSIE compatibility. It now also uses CSS filter to draw a shadow under the popup for Internet Explorer.</li>
</ul>
<p>Future development of these tools will be announced on this blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/10/scripturizer-js-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Search Engine Highlight Javascript 1.3</title>
		<link>http://scott.yang.id.au/2005/09/se-hilite-javascript-13/</link>
		<comments>http://scott.yang.id.au/2005/09/se-hilite-javascript-13/#comments</comments>
		<pubDate>Tue, 13 Sep 2005 04:33:19 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[SE-Hilite]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/09/search-engine-highlight-javascript-13/</guid>
		<description><![CDATA[Further improvement has been made to the Search Engine Highlight Javascript, which has recently been moved from my personal website to FuCoder.com. Here are the changes: Rewrite the parsing engine to use DOM instead of resetting the HTML. Easier customisation on search engines. Use Javascript Cruncher for distribution. Download the SE-Hilite 1.3 (2.7kb, zip). See [...]]]></description>
			<content:encoded><![CDATA[<p>Further improvement has been made to the <a href="http://scott.yang.id.au/code/se-hilite/">Search Engine Highlight</a> Javascript, which has recently been moved from my <a href="http://scott.yang.id.au/">personal website</a> to FuCoder.com. Here are the changes:</p>
<ul>
<li>Rewrite the parsing engine to use DOM instead of resetting the HTML.</li>
<li>Easier customisation on search engines.</li>
<li>Use <a href="http://www.cfoster.net/jscrunch/">Javascript Cruncher</a> for distribution.</li>
</ul>
<p>Download the <a href="http://scott.yang.id.au/wp-content/se-hilite/se_hilite-1.3.zip">SE-Hilite 1.3</a> (2.7kb, zip). See <a href="http://scott.yang.id.au/code/se-hilite/?usage">usage</a> for instruction.</p>
<p>Previously the highlighting was done by grabbing the entire HTML inside the DOM element, doing some sort of regular expression substitution, and then resetting DOM element with the resulting HTML. It has some issues especially in correctly identifying the text, as well as some regexp magic that behaves differently across browsers.</p>
<p>In SE-Hilite 1.3 it has been changed to use DOM functionality exclusively. A DOM-walker has been implemented to iterate through all text nodes and create/insert &lt;span/&gt; elements for matches. It also makes possible to pause in the middle of a DOM-walk, pass the thread back to browser, and then resume the walk later, so that highlighting large documents can be done progressively without locking up the browser.</p>
<p>Performance wise, a DOM walk is also faster than resetting the HTML attribute of a DOM element. The benchmarking document I used was <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html">W3C&#8217;s Document Object Model Core</a> at 436kb, highlighting 4 keywords. Under Firefox 1.5beta1/Win32, both methods were on-par, finished highlighting at around 1.6 seconds on a 1.7Ghz Pentium M. Under Internet Explorer 6 SP 1 however, SE-Hite 1.3 finished the test in 3.1 seconds, but the old innerHTML method hangs the browser completely.</p>
<p>I have yet to test the new code on Safari 1.2/2.0, but I think it should work as <a href="http://developer.apple.com/internet/safari/faq.html#anchor3">Safari supports DOM2</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/09/se-hilite-javascript-13/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Super Mario &#8212; in Javascript</title>
		<link>http://scott.yang.id.au/2005/09/super-mario-in-javascript/</link>
		<comments>http://scott.yang.id.au/2005/09/super-mario-in-javascript/#comments</comments>
		<pubDate>Sat, 10 Sep 2005 13:25:36 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/09/super-mario-in-javascript/</guid>
		<description><![CDATA[Via Boing Boing. Someone in Japan has implemented the whole of Nintendo classic Super Mario in Javascript. This is totally insane. Why someone would do that is beyond me, other than to prove that it can be done. It does bring back quite a bit of childhood memory though&#8230;]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://www.boingboing.net/2005/09/10/super_mario_brothers.html">Boing Boing</a>. <a href="http://janis.or.jp/users/segabito/JavaScriptMaryo.html">Someone in Japan has implemented the whole of Nintendo classic Super Mario in Javascript</a>. This is totally insane. Why someone would do that is beyond me, other than to prove that it can be done. It does bring back quite a bit of childhood memory though&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/09/super-mario-in-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SE Hilite Javascript 1.2</title>
		<link>http://scott.yang.id.au/2005/08/se-hilite-javascript-12/</link>
		<comments>http://scott.yang.id.au/2005/08/se-hilite-javascript-12/#comments</comments>
		<pubDate>Fri, 19 Aug 2005 00:57:17 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/08/se-hilite-javascript-12/</guid>
		<description><![CDATA[Thanks to Alex for reporting the issue, I have updated my Search Engine Highlight Javascript to 1.2. Here are the changes: Fix up the bug when search keyword containing partial match of &#8216;span class="hilite"&#8216;. Having an extra boolean flag Hilite.exact, whether the parser should perform exact match. Default to true, i.e. searching for &#8220;search&#8221; will [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://www.kruijff.org/alex/">Alex</a> for reporting the issue, I have updated my <a href="http://scott.yang.id.au/code/se-hilite/">Search Engine Highlight Javascript</a> to 1.2. Here are the changes:</p>
<ul>
<li>Fix up the bug when search keyword containing partial match of &#8216;<code>span class="hilite"</code>&#8216;.</li>
<li>Having an extra boolean flag <code>Hilite.exact</code>, whether the parser should perform exact match. Default to true, i.e. searching for &#8220;search&#8221; will not match &#8220;<strong>search</strong>ing&#8221;.</li>
<li>Minor performance optimisation.</li>
</ul>
<p>Download the latest version of <a href="http://scott.yang.id.au/code/se-hilite/">Search Engine Highlight Javascript</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/08/se-hilite-javascript-12/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>del.icio.us direc.tor</title>
		<link>http://scott.yang.id.au/2005/06/delicious-director/</link>
		<comments>http://scott.yang.id.au/2005/06/delicious-director/#comments</comments>
		<pubDate>Wed, 29 Jun 2005 12:06:12 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Webmastery]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/06/delicious-director/</guid>
		<description><![CDATA[del.icio.us direc.tor: Johnvey Hwang&#8217;s high performance AJAX web service broker. This script is very neat. Setup a bookmarlet. Visit del.icio.us. Click on the bookmarklet, and it instantly transforms your ugly del.icio.us web interface into a fancy AJAX-driven DHTML interface. What stands out is this implementation does not require a middle man as service broker. It [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://johnvey.com/features/deliciousdirector/">del.icio.us direc.tor: Johnvey Hwang&#8217;s high performance AJAX web service broker</a>. This script is very neat. Setup a bookmarlet. Visit <a href="http://del.icio.us/">del.icio.us</a>. Click on the bookmarklet, and it instantly transforms your <em>ugly</em> del.icio.us web interface into a fancy AJAX-driven DHTML interface.</p>
<p>What stands out is this implementation does not require a middle man as service broker. It breaks the security restriction of XmlHttpRequest by making you visit the site first, click on a link to insert a &lt;javascript/&gt; element to import direc.tor&#8217;s bootstrap script, and completely rewrite the document body (and disable all the stylesheets). Now you have complete control of the document, plus you can make XmlHttpRequest to the site you want, as document location is still the old URL!</p>
<p>For more detailed write up, check <a href="http://johnvey.com/features/deliciousdirector/web-service-broker.html">this article</a> on setting up a client-side web service broker.</p>
<p>Basically it allows you to do what <a href="http://greasemonkey.mozdev.org/">Greasemonkey</a> does, without Greasemonkey or even Mozilla/Firefox. We shall see more and more of this kind of web applications, the ones that <em>re-write</em> your web sites and make into their own.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/06/delicious-director/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

