<?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>Web Developer 2.0 &#187; Monkey Wank Fever</title>
	<atom:link href="http://webdeveloper2.com/tag/monkey-wank-fever/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdeveloper2.com</link>
	<description>A blog about web design and development, tools, techniques, products and relevant news.</description>
	<lastBuildDate>Thu, 09 Sep 2010 00:55:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<cloud domain='webdeveloper2.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Swine Flu + Google-Fu = Monkey Wank Fever</title>
		<link>http://webdeveloper2.com/2009/05/swine-flu-google-fu-monkey-wank-fever/</link>
		<comments>http://webdeveloper2.com/2009/05/swine-flu-google-fu-monkey-wank-fever/#comments</comments>
		<pubDate>Tue, 05 May 2009 16:30:11 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Lab]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Monkey Wank Fever]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[Swine Flu]]></category>

		<guid isPermaLink="false">http://webdeveloper2.com/?p=1052</guid>
		<description><![CDATA[I think something must have clicked in my brain when I read this tweet: If it was Monkey Wank Fever going around, rather than swine flu, I think the national mood would be a lot more buoyant. Graham Linehan I knew that I had some code sitting around from playing with the Google Ajax Search [...]]]></description>
			<content:encoded><![CDATA[<p>I think something must have clicked in my brain when I read this tweet:</p>
<blockquote><p>If it was Monkey Wank Fever going around, rather than swine flu, I think the national mood would be a lot more buoyant.</p>
<p><cite><a href="http://twitter.com/Glinner/status/1657766763">Graham Linehan</a></cite></p></blockquote>
<p>I knew that I had some code sitting around from playing with the Google Ajax Search API. Within a few minutes I&#8217;d cobbled together a simple text-replacement for search results to see if Monkey Wank Fever really did lighten the mood.</p>
<p><a href="http://dev.webdeveloper2.com/iamaswine.htm"><img class="aligncenter size-large wp-image-1053" title="Monkey Wank Fever News" src="http://webdeveloper2.com/wp-content/uploads/2009/05/monkeywankfever-450x356.png" alt="Monkey Wank Fever News" width="450" height="356" /></a></p>
<p>I think it did, but then I have a twisted sense of humor sometimes.</p>
<p>One upshot of this is that I realised just how easy and useful the <a href="http://code.google.com/apis/ajaxsearch/">Google AJAX Search API</a> can be.</p>
<p>To include the API loader, a single script call is added into the page:</p>
<pre class="brush: xml;">
&lt;script src=&quot;http://www.google.com/jsapi?key=[Insert API Key]&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; 
</pre>
<p>then by following the API documentation and examples, it&#8217;s quite easy to build a search query with a customised output.</p>
<pre class="brush: jscript;">
google.load(&quot;search&quot;, &quot;1&quot;);
var webSearch;
google.setOnLoadCallback(wOnLoad);

function wOnLoad() {
    webSearch = new google.search.WebSearch();
    webSearch.setResultSetSize( google.search.Search.SMALL_RESULTSET );
    webSearch.setSearchCompleteCallback(this, webSearchComplete, null);
    webSearch.execute(&quot;swine-flu or \&quot;swine flu\&quot;&quot;);
}
 
function webSearchComplete() {
    if (webSearch.results &amp;&amp; webSearch.results.length &gt; 0) {
        var contentDiv = document.getElementById('webresults');
        contentDiv.innerHTML = '';
        var results = webSearch.results;
        for (var i = 0; i &lt; webSearch.results.length; i++) {
            var result = results[i];
            var resContainer = document.createElement('div');
            var title = document.createElement('h3');
            title.innerHTML = result.titleNoFormatting.replace( /swine/ig, 'Monkey').replace( /influenza|flu/ig, 'Wank Fever').replace( /H1N1/ig, 'MNK3Y');
            var content = document.createElement('div');
            content.setAttribute('class', 'content');
            content.innerHTML = result.content.replace( /swine/ig, 'Monkey').replace( /influenza|flu/ig, 'Wank Fever').replace( /H1N1/ig, 'MNK3Y');
            resContainer.appendChild(title);
            resContainer.appendChild(content);
            contentDiv.appendChild(resContainer);
        }
    }
}
</pre>
<p>It may be in bad taste, but I feel like I&#8217;ve added to my arsenal of web weapons &#8211; sometimes you just can&#8217;t work on something without a goal to aim for. Aimless testing of the AJAX Search API had left me cold, but this silly little project made me sit up and pay attention to what I was doing.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloper2.com/2009/05/swine-flu-google-fu-monkey-wank-fever/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: webdeveloper2.com @ 2010-09-10 20:12:30 by W3 Total Cache -->