<?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>Robert Accettura&#039;s Fun With Wordage &#187; javascript</title>
	<atom:link href="http://robert.accettura.com/blog/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://robert.accettura.com</link>
	<description>Robert Accettura&#039;s Personal Blog on Web Development and Tech</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:43:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://robert.accettura.com/?pushpress=hub'/>
<cloud domain='robert.accettura.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Make Login Pages Autofocus</title>
		<link>http://robert.accettura.com/blog/2012/01/19/make-login-pages-autofocus/</link>
		<comments>http://robert.accettura.com/blog/2012/01/19/make-login-pages-autofocus/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 14:30:33 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=7225</guid>
		<description><![CDATA[I see this way too often and it gets on my nerves. If you have a page that&#8217;s main purpose is a form, such as a login page, please make the page autofocus to the first field in the form. &#8230; <a href="http://robert.accettura.com/blog/2012/01/19/make-login-pages-autofocus/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I see this way too often and it gets on my nerves.  If you have a page that&#8217;s main purpose is a form, such as a login page, please make the page autofocus to the first field in the form.  Having to tab or click on the first field is a nuisance.  Even big sites make this mistake.</p>
<p>If you don&#8217;t care about IE you can do it as simply as:</p>
<pre>

&lt;form method=&quot;post&quot; action=&quot;/&quot;&gt;
&lt;p&gt;
    &lt;label for=&quot;username&quot;&gt;Username:&lt;/label&gt;
    &lt;input type=&quot;text&quot; name=&quot;username&quot; id=&quot;username&quot; autofocus=&quot;autofocus&quot;/&gt;
&lt;/p&gt;
&lt;p&gt;
    &lt;label for=&quot;password&quot;&gt;Password:&lt;/label&gt;
    &lt;input type=&quot;password&quot; name=&quot;password&quot; id=&quot;password&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;input type=&quot;submit&quot; name=&quot;login&quot; value=&quot;Login&quot;/&gt;&lt;/p&gt;
&lt;/form&gt;
</pre>
<p>Since <code>autofocus</code> is boolean you technically don&#8217;t even need to specify an attribute value.</p>
<p>To do it with IE in mind you could use the following JavaScript below the form (no library needed):</p>
<pre>

function focusForm(){
    setTimeout(function(){
        try {
            // id of element to focus on
            var elem = document.getElementById('username');
            elem.focus();
            elem.select();
        } catch(e){}
    }, 50); // setTimeout to fix IE bug
}
focusForm();
</pre>
<p>Note the use of <code>select()</code> so if the form reloads due to an incorrect password the field is not just in focus but the contents highlighted.  There is also a <code>setTimeout()</code> since IE, at least some older versions have trouble with this if it happens too quickly.  50 should be fast enough that it won&#8217;t be noticed by humans.</p>
<p>See how simple that is?  No excuses for not fixing this <img src='http://robert.accettura.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  .
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=7225#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2012/01/f629ed9.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2012/01/19/make-login-pages-autofocus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>localStorage With Cookie Fallback</title>
		<link>http://robert.accettura.com/blog/2012/01/17/localstorage-with-cookie-fallback/</link>
		<comments>http://robert.accettura.com/blog/2012/01/17/localstorage-with-cookie-fallback/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 15:58:04 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=7163</guid>
		<description><![CDATA[I mentioned the other day that localStorage can be used as an alternative for cookies. The benefit is that localStorage doesn&#8217;t sent it&#8217;s data back on every request to the server like a cookie. Headers are uncompressed in http making &#8230; <a href="http://robert.accettura.com/blog/2012/01/17/localstorage-with-cookie-fallback/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://robert.accettura.com/blog/2012/01/13/privacy-issues-behind-localstorage/">mentioned the other day</a> that <code>localStorage</code> can be used as an alternative for cookies. The benefit is that  <code>localStorage</code> doesn&#8217;t sent it&#8217;s data back on every request to the server like a cookie.  Headers are uncompressed in http making that very costly.  However not every web browser out there supports <code>localStorage</code>.  Most however do.</p>
<p>Here&#8217;s an example based on <a href="http://www.jquery.com/">jQuery</a> and <a href="http://archive.plugins.jquery.com/project/Cookie">jQuery.cookie</a>.  It&#8217;s designed to turn objects into JSON and store the JSON representation.  On retrieval it restores the object. This doesn&#8217;t handle things like expiring cookies (it simply defaults to 365 days).  I just had this around from an old project with these very specific requirements and figured I&#8217;d post it as-is in case it can help anyone and to demonstrate.  This isn&#8217;t ideal for reuse, but for someone playing with the idea, maybe it will motivate <img src='http://robert.accettura.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  .</p>
<pre>

function storeData(type, obj){
    var data = jQuery.toJSON(obj);

    // If using a modern browser, lets use localStorage and avoid the overhead
    // of a cookie
    if(typeof localStorage != 'undefined' &amp;&amp; localStorage !== null){
        localStorage[type] = data;
    }

    // Otherwise we need to store data in a cookie, not quite so eloquent.
    else {
        jQuery.cookie(type, data, { expires: 365, path: '/' });
    }
}

function loadStoredData(type){
     var data;

    // If using localStorage, retrieve from there
    if(typeof localStorage != 'undefined' &amp;&amp; localStorage !== null){
        data = localStorage[type];
    }

    // Otherwise we have to use cookie based storage
    else {
        data = jQuery.cookie(type);
    }

    // If we have data, lets turn it into an object, otherwise return false
    if(data){
        return jQuery.secureEvalJSON(data);
    }
    return false;
}
</pre>
<p>Pretty simple right?  It&#8217;s still a key/value API.
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=7163#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2012/01/1349b36.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2012/01/17/localstorage-with-cookie-fallback/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery And Checkbox Values</title>
		<link>http://robert.accettura.com/blog/2012/01/02/jquery-and-checkbox-values/</link>
		<comments>http://robert.accettura.com/blog/2012/01/02/jquery-and-checkbox-values/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 02:33:09 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=6958</guid>
		<description><![CDATA[I rarely use checkboxes and radio buttons. Perhaps because of that I forgot this little rookie error. For the intents and purposes below assume the following HTML: &#60;p&#62; &#60;label for=&#34;checkbox1&#34;&#62;Checkbox 1&#60;/label&#62; &#60;input type=&#34;checkbox&#34; id=&#34;checkbox1&#34; checked=&#34;checked&#34;/&#62; &#60;/p&#62; &#60;p&#62; &#60;label for=&#34;checkbox2&#34;&#62;Checkbox 2&#60;/label&#62; &#8230; <a href="http://robert.accettura.com/blog/2012/01/02/jquery-and-checkbox-values/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I rarely use checkboxes and radio buttons.  Perhaps because of that I forgot this little rookie error.  </p>
<p>For the intents and purposes below assume the following HTML:</p>
<pre>

&lt;p&gt;
&lt;label for=&quot;checkbox1&quot;&gt;Checkbox 1&lt;/label&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;checkbox1&quot; checked=&quot;checked&quot;/&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for=&quot;checkbox2&quot;&gt;Checkbox 2&lt;/label&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;checkbox2&quot;/&gt;
&lt;/p&gt;
</pre>
<p>You wouldn&#8217;t really expect it, but both of these return &#8220;on&#8221; when you get the <code>val()</code>:</p>
<pre>

$('#checkbox1').val(); // returns &quot;on&quot;
$('#checkbox2').val(); // returns &quot;on&quot;
</pre>
<p>Now say you flipped them by unchecking checkbox1 and checking checkbox2.  Same thing:</p>
<pre>

$('#checkbox1').val(); // returns &quot;on&quot;
$('#checkbox2').val(); // returns &quot;on&quot;
</pre>
<p>Now reload the page, so one is checked and two is not checked.  Try again this time using <code>.attr('checked');</code>.  That also doesn&#8217;t work, but that makes sense.  jQuery 1.6&#8242;s release notes even explain it:</p>
<blockquote cite="http://blog.jquery.com/2011/05/03/jquery-16-released/"><p>
Before jQuery 1.6, .attr(&#8220;checked&#8221;) returned the Boolean property value (true) but as of jQuery 1.6 it returns the actual value of the attribute (an empty string), which doesn’t change when the user clicks the checkbox to change its state
</p></blockquote>
<p>The best way I&#8217;ve found to get a checkbox value is to use the <code>is()</code> method:</p>
<pre>

$('#checkbox1').is(':checked') // returns true
</pre>
<p>As to why <code>val()</code> doesn&#8217;t check the type of node and do this for me automatically?  I&#8217;m not entirely sure. I&#8217;m assuming backwards compatibility.   I suspect I&#8217;m not the only one who keeps forgetting this little caveat.
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=6958#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2012/01/27e9661.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2012/01/02/jquery-and-checkbox-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On The Future Of Flash</title>
		<link>http://robert.accettura.com/blog/2011/11/09/on-the-future-of-flash/</link>
		<comments>http://robert.accettura.com/blog/2011/11/09/on-the-future-of-flash/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 02:30:08 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=6523</guid>
		<description><![CDATA[Adobe is killing Flash, as a plugin for mobile. This shouldn&#8217;t come as a surprise to anyone who works on the web. Anyone who knows me knows I&#8217;ve bet on HTML5 since the beginning and haven&#8217;t been ashamed to say &#8230; <a href="http://robert.accettura.com/blog/2011/11/09/on-the-future-of-flash/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Adobe is killing Flash, as a plugin for mobile.  This shouldn&#8217;t come as a surprise to anyone who works on the web.  Anyone who knows me knows I&#8217;ve bet on HTML5 since the beginning and haven&#8217;t been ashamed to say it.  I don&#8217;t do Flash.  To quote <a href="http://blogs.adobe.com/conversations/2011/11/flash-focus.html">Adobe</a>:</p>
<blockquote cite="http://blogs.adobe.com/conversations/2011/11/flash-focus.html"><p>
Our future work with Flash on mobile devices will be focused on enabling Flash developers to package native apps with Adobe AIR for all the major app stores.  We will no longer continue to develop Flash Player in the browser to work with new mobile device configurations (chipset, browser, OS version, etc.) following the upcoming release of Flash Player 11.1 for Android and BlackBerry PlayBook.
</p></blockquote>
<p>I strongly suspect that even this use case is limited and will experience the same fate as the Flash plugin within the next 24-36 months.  HTML5 is supported by browsers, a browser is shipped with the OS and is highly optimized for what it&#8217;s running on.  It&#8217;s also the ultimate in cross-platform.  Why write Flash when you can do something for every platform and not rely on a vendor to abstract you?</p>
<p>Platforms like <a href="http://phonegap.com/">PhoneGap</a> bridge the world of Apps and HTML5 quite nicely.  Adobe bought Nitobi which develops PhoneGap, but PhoneGap is also going to Apache Software Foundation which means Adobe&#8217;s ability to derail the project would be somewhat limited if they wanted to go that route.</p>
<p>Quite a few Apps use HTML/JS extensively already.  HTML5&#8242;s success is despite Apple essentially <a href="http://www.blaze.io/mobile/ios5-top10-performance-changes/">crippling</a> the use of HTML5 in native apps by preventing <code>UIWebView</code> from taking advantage of the Nitro engine.  If/when Apple gets to fixing this another barrier will be gone.  I suspect Apple will eventually make scrolling that doesn&#8217;t suck on iOS easier.  Right now Joe Hewitt&#8217;s <a href="https://github.com/joehewitt/scrollability">Scrollability</a> is likely your best bet.</p>
<p>Adobe goes on to say:</p>
<blockquote cite="http://blogs.adobe.com/conversations/2011/11/flash-focus.html"><p>
However, HTML5 is now universally supported on major mobile devices, in some cases exclusively.  This makes HTML5 the best solution for creating and deploying content in the browser across mobile platforms. We are excited about this, and will continue our work with key players in the HTML community, including Google, Apple, Microsoft and RIM, to drive HTML5 innovation they can use to advance their mobile browsers.
</p></blockquote>
<p>Interestingly they left out that little browser vendor Mozilla.  Perhaps because they are most likely targeting WebKit on mobile and that&#8217;s the common tie between those companies sans-Microsoft which they need IE support.  If Adobe wants a future here they should learn quick that you can&#8217;t ignore platforms. My advice to Adobe is to make sure their solution allows developers to bring their product to <em>any</em> modern browser on <em>any</em> device.</p>
<p>Flash is the last plugin with real usage even on the desktop.  This is the first step towards the concept of plugins in the browser going away.  It&#8217;s unlikely many will see a need to go HTML5 on mobile and develop a separate Flash code base to do the same thing on a desktop.  The name of the game these days is write once, run anywhere (credit to Sun for the slogan).  Today marks the start of the decline of Flash.</p>
<p>As Brendan Eich best put it: &#8220;<a href="http://www.slideshare.net/BrendanEich/capitol-js">Always bet on JavasScript</a>&#8220;.  I have and I continue to do so.  The Open Web is winning.  Slowly but surely.
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=6523#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2011/11/4d19b37.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2011/11/09/on-the-future-of-flash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quick Thoughts On Dart</title>
		<link>http://robert.accettura.com/blog/2011/10/11/quick-thoughts-on-dart/</link>
		<comments>http://robert.accettura.com/blog/2011/10/11/quick-thoughts-on-dart/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 14:02:08 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[dash]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=6352</guid>
		<description><![CDATA[Google yesterday officially took the wraps off Dart. Google decided to stop short of outright calling it a replacement for JavaScript, however that does seem to be one of the goals. I&#8217;m still looking at it myself, but my first &#8230; <a href="http://robert.accettura.com/blog/2011/10/11/quick-thoughts-on-dart/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Google yesterday officially took the wraps off <a href="http://www.dartlang.org">Dart</a>.  Google decided to stop short of outright calling it a replacement for JavaScript, however that does seem to be one of the goals.</p>
<p>I&#8217;m still looking at it myself, but my first impression is that the point of another language is buried in the details of the <a href="http://googlecode.blogspot.com/2011/10/dart-language-for-structured-web.html">announcement</a>.  This particular sentence I think is the focal point (emphasis mine):</p>
<blockquote cite="http://googlecode.blogspot.com/2011/10/dart-language-for-structured-web.html">
<ul>
<li>Ensure that Dart delivers high performance on all modern web browsers and environments ranging from small handheld devices <strong>to server-side execution</strong>.</li>
</ul>
</blockquote>
<p>I suspect the real goal behind Dart is to unify the stack as much as possible.  Web Development today is one of the most convoluted things you can do in Computer Science.  Think about just the technologies/languages you are going to deal with to create a &#8220;typical&#8221; application:</p>
<ul>
<li>SQL</li>
<li>Server Side Language</li>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
<p>That&#8217;s actually a <em>very</em> simple stack and almost academic in nature.  &#8220;In real life&#8221; Most stacks are even more complicated, especially when dealing with big data.  Most professions deal with a handful of technologies. Web Development deals with whatever is at hand.  I&#8217;m not even getting into supporting multiple versions of multiple browsers on multiple OS&#8217;s.</p>
<p>Google even said in a <a href="http://pastebin.com/NUMTTrKj">leaked internal memo</a>:</p>
<blockquote cite="http://pastebin.com/NUMTTrKj"><p>
- Front-end Server &#8212; Dash will be designed as a language that can be used server-side for things up to the size of Google-scale Front Ends.  This will allow large scale applications to unify on a single language for client and front end code.
</p></blockquote>
<p>Additionally:</p>
<blockquote><p>
What happened to Joy?<br />
The Joy templating and MVC systems are higher-level frameworks that will be built on top of Dash.
</p></blockquote>
<p>By using one language you&#8217;d reduce what a developer needs to know and specialize in to build an application.  This means higher productivity and more innovation and less knowledge overhead.</p>
<p>This wouldn&#8217;t be the first attempt at this either for Google.  <a href="https://code.google.com/webtoolkit/">GWT</a> is another Google effort to let developers write Java that&#8217;s transformed into JavaScript.  This however <a href="http://ryandoherty.net/2007/04/29/why-google-web-toolkit-rots-your-brain/">doesn&#8217;t always work well</a> and has limitations.</p>
<p>The web community has actually been working on this in the other direction via <a href="http://nodejs.org/">node.js</a> which instead takes JS and puts it on the server side, rather than inventing a language that seems almost server side and wanting to put it in the browser.</p>
<p>Google still seems to have plans for <a href="http://golang.org/">Go</a>:</p>
<blockquote><p>
What about Go?<br />
Go is a very promising systems-programming language in the vein of C++.  We fully hope and expect that Go becomes the standard back-end language at Google over the next few years.   Dash is focused on client (and eventually Front-end server development).  The needs there are different (flexibility vs. stability) and therefore a different programming language is warranted.
</p></blockquote>
<p>It seems like Go would be used where C++ or other high performance compiled languages are used today and Dart would be used for higher level front-end application servers as well as the client side, either directly or through a compiler which would turn it into JavaScript.</p>
<p>Would other browsers (Safari, Firefox, IE) consider adopting it?  I&#8217;m unsure.  Safari would likely have a lead as the memo states &#8220;Harmony will be implemented in V8 and JSC (Safari) simultaneously to avoid a WebKit compatibility gap&#8221;.  Presumably IE and Firefox would be on their own to implement or adapt that work.</p>
<p>New languages rarely succeed in adoption.  On the internet the barrier is even higher.
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=6352#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2011/10/9f16b57.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2011/10/11/quick-thoughts-on-dart/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Things You&#8217;ll Love About Firefox 4.0</title>
		<link>http://robert.accettura.com/blog/2011/03/21/things-youll-love-about-firefox-4-0/</link>
		<comments>http://robert.accettura.com/blog/2011/03/21/things-youll-love-about-firefox-4-0/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 15:00:14 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[do not track]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox 4.0]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[smil]]></category>
		<category><![CDATA[svg]]></category>
		<category><![CDATA[user-interface]]></category>
		<category><![CDATA[webgl]]></category>
		<category><![CDATA[webm]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=5428</guid>
		<description><![CDATA[It&#8217;s that time again. Here&#8217;s my list of awesome things you&#8217;ll love about Firefox 4: For Users New Look For Tabs One of the first things that you’ll notice is tabs on top. This paradigm really makes more sense since &#8230; <a href="http://robert.accettura.com/blog/2011/03/21/things-youll-love-about-firefox-4-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s that time again.  Here&#8217;s my list of awesome things you&#8217;ll love about Firefox 4:</p>
<h3>For Users</h3>
<h4>New Look For Tabs</h4>
<p><img src="http://robert.accettura.com/wp-content/uploads/2011/03/20110321_new_tabs_firefox_4-620x76.jpg" alt="New Tabs For Firefox 4" title="New Tabs For Firefox 4" width="620" height="76" class="aligncenter size-Blog2011 wp-image-5436" /><br />
One of the first things that you’ll notice is tabs on top.  This paradigm really makes more sense since the tab defines not just the content but the environment it’s viewed (prev/next button, URL bar).  It’s also just much sleeker looking.  After a few minutes you’ll likely agree this is a better approach than tabs under.</p>
<p>Another nice touch is if you enter a URL that’s already open in another tab, you’ll be given the option to switch to that tab.  Perfect for those of us who end up with 50 tabs by lunch time.</p>
<p>It also just feels tighter and less intrusive on the web browsing experience.</p>
<p><span id="more-5428"></span></p>
<h4>App Tabs</h4>
<p><img src="http://robert.accettura.com/wp-content/uploads/2011/03/20110321_app_tabs-620x76.jpg" alt="App Tabs" title="App Tabs" width="620" height="76" class="aligncenter size-Blog2011 wp-image-5435" /><br />
App Tabs are a great way to pin sites you use constantly (webmail, Twitter, Facebook, etc.) to your browser and make them easily accessible throughout the day.  I suspect many webmail/Facebook addicts will really dig this feature.  To use it, right clicking on a tab and “Pin as app tab”.  Don’t need it?  Don’t use it, it’s not forced upon you.</p>
<h4>Tab Groups</h4>
<p><img src="http://robert.accettura.com/wp-content/uploads/2011/03/20110321_tab_groups-620x519.jpg" alt="Tab groups" title="Tab Groups" width="620" height="519" class="aligncenter size-Blog2011 wp-image-5434" /><br />
Tab groups are simply a way to group your tabs so that you can stay a little more organized through the day.  For example you might group tabs for “personal” and “work” then switch between the two groups a few times per day, rather than navigating through 50 tabs to find what you’re looking for.  The tab groups interface also gives you a more visual way of navigating tabs and a search feature for searching for a particular tab.  I personally like it for searching through the dozen bugzilla bug reports I have open through the day. It takes a little effort to work into your workflow, and I’m personally not quite there yet, but once you do it seems to really be handy.  Again you can ignore it if you feel no need. </p>
<h4>Goodbye Status Bar</h4>
<p>The status bar you used to see at the bottom of the window is gone for most people.  If you have an add-on that relies on it, for now it will still show (one of my computers still has it).  Just another few pixels for web content.  It does take slight getting used to for the technical folks who watch the connections as we&#8217;ve been used to looking at that bar for 15 years or so.  For the rest of you, it&#8217;s just more web on your screen to fill with photos of cats and amusing captions.</p>
<h4>Polish</h4>
<p>Like every Firefox release, there’s little polish, cleanup, simplifications everywhere.  To many to go into each individual tweaks but you’ll see some, and others you correctly won’t see as unused and outdated options are gone.</p>
<h4>Sync</h4>
<p>Sync is now built-in.  Settings, passwords, bookmarks, history, open tabs.  It’s encrypted on your computer then sent, so the only one who can view the data is you.  I’ve called this the <a href="http://robert.accettura.com/blog/2011/03/03/wanted-native-js-encryption/">ultimate security model</a> in the past.  It&#8217;s optional, you don&#8217;t have to use it, you don&#8217;t loose anything by not using it, other than the ability to sync multiple computers obviously.</p>
<h4>Add-on Manager</h4>
<p><img src="http://robert.accettura.com/wp-content/uploads/2011/03/20110321_addon_manager-620x349.jpg" alt="Add-On Manager" title="Add-On Manager" width="620" height="349" class="aligncenter size-Blog2011 wp-image-5433" /><br />
The add-on manager got some love in 4.0.  </p>
<h4>OMG Fast!</h4>
<p>Firefox 4 is faster in almost every respect.  First of all, it seems much more responsive on startup.  Its JägerMonkey JavaScript engine has really made a difference in <a href="http://www.mozilla.com/en-US/firefox/RC/features/">various benchmarks</a> including Kraken, Sunspider, and V8.  It also has hardware accelerated graphics.  Even on Windows XP, which is still fully supported (ahem). </p>
<h4>Out Of Process Plugins (Mac)</h4>
<p>Windows and Linux got this in Firefox 3.6, the Mac version was a little behind schedule.  Plugins now run outside of the Firefox process.  That means when a plugin like Flash crashes, it won’t take out your entire browser.  As Windows users will tell you, this makes a big difference in terms of stability.</p>
<h4>Do Not Track</h4>
<p>Simply put it’s a way to tell websites and advertisers that <a href="https://wiki.mozilla.org/Privacy/Jan2011_DoNotTrack_FAQ">you don’t want to be tracked.</a>  It’s obviously up to websites/advertisers to honor the flag.</p>
<p>To enable it go into Preferences and under the “Advanced” tab select the “General” sub-tab and check the “Tell web sites I do not want to be tracked” checkbox.</p>
<h3>For Developers</h3>
<h4>Support for WebM Video</h4>
<p>I&#8217;ve discussed <a href="http://robert.accettura.com/?s=webm">WebM</a> on this blog before and won&#8217;t repeat what I&#8217;ve said before.  WebM is an open standard, it looks great.</p>
<h4>WebGL</h4>
<p><a href="https://developer.mozilla.org/en/WebGL">WebGL</a> is amazing.  Check out some of the demos by <a href="http://hacks.mozilla.org/category/webgl/">Mozilla</a> or gathered by the <a href="http://www.chromeexperiments.com/webgl">Chromium team</a>.</p>
<p>Take a look at <a href="http://videos.mozilla.org/serv/mozhacks/flight-of-the-navigator/">Flight of the Navigator</a> and remember: this is the web!</p>
<p><img src="http://robert.accettura.com/wp-content/uploads/2011/03/20110321_webgl_flight_of_the_navigator-620x313.jpg" alt="WebGL Flight Of The Navigator" title="WebGL Flight Of The Navigator" width="620" height="313" class="aligncenter size-Blog2011 wp-image-5432" /></p>
<h4>Fix for the CSS :visited hole</h4>
<p>Just a FYI, this <a href="http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/">no longer works</a>.</p>
<h4>Web Console</h4>
<p><a href="https://developer.mozilla.org/en/Using_the_Web_Console">This</a> replaces the old Error Console and in many ways is almost like Firebug Lite.  It’s got some great features like HTTP headers and will make it a lot easier to quickly debug things if you’re using a computer without Firebug already installed.  If you are a web developer make sure to take a look.</p>
<h4>Do Not Track Header</h4>
<p>This is a feature that’s been in the news quite a bit, and mentioned above.  When enabled all HTTP requests will include the following header:</p>
<pre>
DNT: 1
</pre>
<h4>HTTP Strict Transport Security</h4>
<p><a href="http://blog.mozilla.com/security/2010/08/27/http-strict-transport-security/">A HTTP header</a> to tell browsers to only use HTTPS to communicate with the site.  As more sites start to switch to HTTPS this is a great way to mitigate some potential attack vectors.</p>
<h4>CSS border-radius</h4>
<p>If you’re a web developer or designer you’ve likely tried to do this before using images and realized how much it sucks.  Now you can do it with the <a href="https://developer.mozilla.org/en/CSS/border-radius">simplicity of CSS</a>.</p>
<h4>CSS -moz-calc</h4>
<p><a href="https://developer.mozilla.org/en/CSS/-moz-calc">Do calculations</a> to determine the size and shape of an object.  I can’t tell you how many times this would have been realy helpful. </p>
<h4>HTML5 Parser</h4>
<p>Faster, more powerful, more consistent, <a href="https://developer.mozilla.org/en/HTML/HTML5/HTML5_Parser">futuristic</a>!</p>
<h4>Partial Support For HTML5 Forms</h4>
<p><a href="https://developer.mozilla.org/en/HTML/HTML5/Forms_in_HTML5">Forms in HTML5</a> are pretty awesome.  I won’t go into detail on HTML5 forms here, but you should check them out.</p>
<h4>SVG Animation with SMIL</h4>
<p>Exactly what the title says.  I suspect <a href="https://developer.mozilla.org/en/SVG/SVG_animation_with_SMIL">this</a> will result in some really cool things over time, and some really pointless things that we’ll still find amusing.</p>
<p>Of course that&#8217;s not all, just the stuff I really find to be the most interesting.
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=5428#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2011/03/609c5e5.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2011/03/21/things-youll-love-about-firefox-4-0/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Async AdSense</title>
		<link>http://robert.accettura.com/blog/2011/03/17/async-adsense/</link>
		<comments>http://robert.accettura.com/blog/2011/03/17/async-adsense/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 23:40:25 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=5421</guid>
		<description><![CDATA[About a year ago I asked where the async Google AdSense was. It finally arrived, and you need to do nothing to gain the performance. Awesome!]]></description>
			<content:encoded><![CDATA[<p>About a year ago I asked where the <a href="http://robert.accettura.com/blog/2010/02/11/where-is-the-asynchronous-adsense-google/">async Google AdSense</a> was.  It <a href="http://adsense.blogspot.com/2011/03/making-web-faster-for-all-adsense-for.html">finally arrived</a>, and you need to do nothing to gain the performance.  Awesome!
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=5421#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2011/03/07dbd9a.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2011/03/17/async-adsense/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wanted: Native JS Encryption</title>
		<link>http://robert.accettura.com/blog/2011/03/03/wanted-native-js-encryption/</link>
		<comments>http://robert.accettura.com/blog/2011/03/03/wanted-native-js-encryption/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 15:01:38 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mozilla sync]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=5358</guid>
		<description><![CDATA[I&#8217;d like to challenge all browser vendors to put together a comprehensive JS API for encryption. I&#8217;ll use this blog post to prove why it&#8217;s necessary and would be a great move to do so. The Ultimate Security Model I &#8230; <a href="http://robert.accettura.com/blog/2011/03/03/wanted-native-js-encryption/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to challenge all browser vendors to put together a comprehensive JS API for encryption.  I&#8217;ll use this blog post to prove why it&#8217;s necessary and would be a great move to do so.</p>
<h3>The Ultimate Security Model</h3>
<p>I consider <a href="https://mozillalabs.com/sync">Mozilla Sync</a> (formerly known as &#8220;Weave&#8221;) to have the <a href="https://wiki.mozilla.org/Labs/Weave/Crypto">ultimate security model</a>.  As a brief background, Mozilla Sync is a service that synchronizes your bookmarks, browsing history, etc. between computers using &#8220;the cloud&#8221;.  Obviously this has privacy implications.  The solution basically works as follows:</p>
<ol>
<li>Your data is created on your computer (obviously).</li>
<li>Your data is encrypted on your computer.</li>
<li>Your data is transmitted securely to servers in an encrypted state.</li>
<li>Your data is retrieved and decrypted on your computer.</li>
</ol>
<p>The only one who can ever decrypt your data is you.  It&#8217;s the ultimate security model.  The data on the server is encrypted and the server has no way to decrypt it.  A typical web service works like this:</p>
<ol>
<li>Your data is created on your computer.</li>
<li>Your data is transmitted securely to servers.</li>
<li>Your data is transmitted securely back to you.</li>
</ol>
<p>The whole time it&#8217;s on the remote servers, it could in theory be retrieved by criminals, nosy sysadmins, governments, etc.  There are times when you want a server to read your data to do something useful, but there are times where it shouldn&#8217;t.</p>
<h3>The Rise Of Cloud Data And HTML5</h3>
<p>It&#8217;s no secret that more people are moving more of their data in to what sales people call &#8220;the cloud&#8221; (<a href="http://mail.google.com">Gmail</a>, <a href="http://www.dropbox.com">Dropbox</a>, <a href="http://www.rememberthemilk.com">Remember The Milk</a>, etc). More and more of people&#8217;s data is out there in this maze of computers.  I don&#8217;t need to dwell too much about the issues raised by personal data being stored in places where 4th amendment rights aren&#8217;t exactly clear in the US and may not exist in other locales.  It&#8217;s been written about enough in the industry.</p>
<p>Additionally newer features like Web Storage allow for 5-10 MB of storage on the client side for data, often used for &#8220;offline&#8221; versions of a site.  This is really handy but makes any computer or cell phone used a potentially treasure trove of data if that&#8217;s not correctly purged or protected.  I expect that 5-10 MB barrier to rise over time just like disk cache.  Even my cell phone can likely afford more than 5-10 MB.  My digital camera can hold 16 GB in a card a little larger than  my fingernail.  Local storage is already pretty cheap these days, and will likely only get cheaper.</p>
<p>Mobile phones are hardly immune from all this as they feature increasingly robust browsers capable of all sorts of HTML5 magic.  The rise of mobile &#8220;apps&#8221; is powered largely by the offline abilities and storage functionality.  Web Storage facilitates this in many ways but doesn&#8217;t provide any inherent security.</p>
<p>Again, I don&#8217;t need to dwell here, but people are leaving increasingly sensitive data on devices they use, and services they use.  SSL protects them while data is moving over the wire, but does nothing for them once data gets to either end.  The time spent over the wire is measured in milliseconds, the time spent at either end can be measured in years.</p>
<h3>Enter JS Crypto</h3>
<p>My proposal is that there&#8217;s a need for native JS Cryptography implementing several popular algorithms like AES, Serpent, Twofish, MD5 (I know it&#8217;s busted, but still could be handy for legacy reasons), SHA-256 and expanding as cryptography matures.  By doing so, the front end logic can easily and quickly encrypt data before storing or sending.</p>
<p>For example to protect Web Storage before actually saving to <code>globalStorage</code>:</p>
<pre>

globalStorage['mybank.com'].lastBalance = &quot;0.50&quot;; 
</pre>
<pre>

globalStorage['mybank.com'].lastBalance = Crypto.AES.encrypt(&quot;0.50&quot;, password); 
</pre>
<p>Using <code>xmlHttpRequest</code> or POST/GET one could send encrypted payloads directly to the server over http or https rather than send raw data to the server.  This greatly facilitates the Mozilla Sync model of data security.</p>
<p>This can also be an interesting way to transmit select data in a secure manner while serving the rest of a site over http using <code>xmlHttpRequest</code> by just wrapping the data in crypto (that assumes a shared key).  </p>
<p>I&#8217;m sure there are other uses that I haven&#8217;t even thought of.</p>
<h3>Performance</h3>
<p>JS libraries like <a href="https://code.google.com/p/crypto-js/">Crypto-JS</a> are pretty cool, but they aren&#8217;t ideal.  We need something as fast and powerful as we can get.  Like I said earlier, mobile is a big deal here and mobile has performance and power issues.  Intel and AMD now have <a href="http://software.intel.com/en-us/articles/intel-advanced-encryption-standard-instructions-aes-ni/">AES Native Instructions</a> (AES NI) for their desktop chips.  I suspect mobile chips who don&#8217;t have this will eventually do so.  I don&#8217;t think any amount of JS optimization will get that far performance wise.  We&#8217;re talking 5-10 MB of client side data today, and that will only grow.  We&#8217;re not even talking about encrypting data before remote storage (which in theory can break the 10MB limit).</p>
<p>Furthermore, most browsers already have a Swiss Army knife of crypto support already, just not exposed via JS in a nice friendly API.  I don&#8217;t think any are currently using AES NI when available, though that&#8217;s a pretty new feature and I&#8217;m sure in time someone will investigate that.</p>
<p>Providing a cryptography API would be a great way to encourage websites to up the security model in an HTML5 world. </p>
<h3>Wait a second…</h3>
<h4>Shouldn&#8217;t browsers just encrypt Web Storage, or let OS vendors turn on Full Disk Encryption (FDE)?</h4>
<p>Sure, both are great, but web apps should be in control of their own security model regardless of what the terminal is doing.  Even if they are encrypted, that doesn&#8217;t provide a great security model if the browser has one security model in place for Web Storage and the site has its own authentication system.</p>
<h4>Don&#8217;t JS Libraries already exist, and isn&#8217;t JS getting the point of almost being native?</h4>
<p>True, libraries do exist, and JS is getting amazingly fast to the point of threatening native code.  However crypto is now being hardware accelerated.  It&#8217;s also something that can be grossly simplified by getting rid of libraries.  I view JS crypto libraries the way I view <a href="http://excanvas.sourceforge.net/">ExplorerCanvas</a>.  Great, but I&#8217;d prefer a native implementation for its performance.  These libraries do still have a place bridging support for browsers that don&#8217;t have native support in the form of a shim.</p>
<h4>But if data is encrypted before sending to a server, the server can&#8217;t do anything with it</h4>
<p>That&#8217;s the point!  This isn&#8217;t ideal in all cases for example you can&#8217;t encrypt photos you intend to share on Facebook or Flickr, but a DropBox like service may be an ideal candidate for encryption.</p>
<h4>What about export laws?</h4>
<p>What about them?  Browsers have been shipping cryptography for years.  This is just exposing cryptography so web developers can better take advantage and secure user data.  If anything JS crypto implementations likely create a bigger legal issue regarding &#8220;exporting&#8221; cryptography for web developers.</p>
<h4>Your crazy!</h4>
<p>Perhaps.  To quote Apple&#8217;s <a href="http://en.wikipedia.org/wiki/Think_Different">Think Different Campaign</a></p>
<blockquote cite="http://en.wikipedia.org/wiki/Think_Different"><p>
Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes.</p>
<p>The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them.</p>
<p>About the only thing you can’t do is ignore them. Because they change things. They invent. They imagine. They heal. They explore. They create. They inspire. They push the human race forward.</p>
<p>Maybe they have to be crazy.</p>
<p>How else can you stare at an empty canvas and see a work of art? Or sit in silence and hear a song that’s never been written? Or gaze at a red planet and see a laboratory on wheels?</p>
<p>While some see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.
</p></blockquote>
<p>Time to enable the crazy ones to do things in a more secure way.</p>
<p><small><strong>Updated:</strong> Changed <code>key</code> to <code>password</code> to better reflect likely implementation in the psudocode.</small>
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=5358#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2011/03/3a246af.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2011/03/03/wanted-native-js-encryption/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Enterprise CSS/JS/HTML</title>
		<link>http://robert.accettura.com/blog/2010/10/19/enterprise-cssjshtml/</link>
		<comments>http://robert.accettura.com/blog/2010/10/19/enterprise-cssjshtml/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 02:01:45 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Around The Web]]></category>
		<category><![CDATA[Funny]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=4833</guid>
		<description><![CDATA[Here&#8217;s a fantastic trilogy of websites: Enterprise HTML / JS / CSS. What makes them so brilliant is that they are actually 100% true. I spent a summer cleaning up just this type of stuff. It&#8217;s true, it&#8217;s out there, &#8230; <a href="http://robert.accettura.com/blog/2010/10/19/enterprise-cssjshtml/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a fantastic trilogy of websites: Enterprise <a href="http://enterprise-html.com/">HTML</a> / <a href="http://enterprise-js.com/">JS</a> / <a href="http://enterprise-css.com/">CSS</a>.</p>
<p>What makes them so brilliant is that they are actually 100% true.  I spent a summer cleaning up just this type of stuff.  It&#8217;s true, it&#8217;s out there, it&#8217;s painful.
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=4833#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2010/10/41071a1.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2010/10/19/enterprise-cssjshtml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Pac-Man Hacking</title>
		<link>http://robert.accettura.com/blog/2010/05/21/google-pac-man-hacking/</link>
		<comments>http://robert.accettura.com/blog/2010/05/21/google-pac-man-hacking/#comments</comments>
		<pubDate>Fri, 21 May 2010 16:37:04 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pac-man]]></category>

		<guid isPermaLink="false">http://robert.accettura.com/?p=4035</guid>
		<description><![CDATA[Quick Hack Here&#8217;s a literally 2 minute hack for the Google Pac-Man tribute on the homepage right now to put your own face on Pac-Man (pardon my poor photoshopping): To try it add the following bookmarklet to your browser by &#8230; <a href="http://robert.accettura.com/blog/2010/05/21/google-pac-man-hacking/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://robert.accettura.com/wp-content/uploads/2010/05/pacman_screenshot.png" alt="Google Pac-man" title="Google Pac-man" class="centered aligncenter size-full wp-image-4036" height="185" width="553"/></p>
<h3>Quick Hack</h3>
<p>Here&#8217;s a literally 2 minute hack for the Google Pac-Man tribute on the homepage right now to put your own face on Pac-Man (pardon my poor photoshopping):</p>
<p><img src="http://robert.accettura.com/wp-content/uploads/2010/05/pacman_raccettura_screenshot.png" alt="Pac-Man raccetturaized" title="Pac-Man raccetturaized" class="centered aligncenter size-full wp-image-4037" height="185" width="553"/></p>
<p>To try it add the following bookmarklet to your browser by dragging the link below to your bookmark bar:<br />
<a href="javascript:(function(){document.getElementById('actor0').style['backgroundImage']=&quot;url('http://robert.accettura.com/wp-content/uploads/2010/05/raccettura_pacman.png')&quot;;})()">raccettura-ize pacman</a></p>
<p>Now go to <a href="http://www.google.com">Google</a> and press &#8220;Insert Coin&#8221; to play the game.  Once the game loads, run the bookmarklet by clicking on it.</p>
<h3>Hack yourself into Pac-Man</h3>
<p>Want to make your own? You likely have better photoshop skills than me.  Download <a href="http://robert.accettura.com/wp-content/uploads/2010/05/orig_pacman.png">this image</a> and replace the Pac-Man (and optionally Ms. Pac-Man) images with ones of your own keeping the position and sizes the same.  Save as a PNG with transparency.  Then upload somewhere.  Now make a bookmarklet that looks like this (replacing <code>URL_TO_YOUR_IMAGE</code> with the url of your image):</p>
<pre>javascript:(function(){document.getElementById('actor0').style['backgroundImage']="url('URL_TO_YOUR_IMAGE')";})()
</pre>
<p>Now share with your friends.</p>
<h3>Permanent Home</h3>
<p>Google has now removed Pac-Man from the homepage but it can still be found <a href="http://google.com/pacman/">here</a>.</p>
<p><small><strong>Edit [5/24/2010 @ 8:45 PM EST]:</strong> Added &#8220;Permanent Home&#8221;.</small>
<div id="rja_commentCountImage"><a href="http://robert.accettura.com/?p=4035#comments"><img src="http://robert.accettura.com/wp-content/commentCount/2010/05/4f81b1d.gif" alt="Comment Count" style="border:0;" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://robert.accettura.com/blog/2010/05/21/google-pac-man-hacking/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

