<?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>sixohthree.com &#187; bookmarklet</title>
	<atom:link href="http://sixohthree.com/tag/bookmarklet/feed" rel="self" type="application/rss+xml" />
	<link>http://sixohthree.com</link>
	<description>The Weblog of Adam Backstrom</description>
	<lastBuildDate>Wed, 08 Feb 2012 14:27:11 +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>JavaScript Bookmarklets</title>
		<link>http://sixohthree.com/554/bookmarklet</link>
		<comments>http://sixohthree.com/554/bookmarklet#comments</comments>
		<pubDate>Mon, 06 Oct 2008 13:38:02 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bookmarklet]]></category>

		<guid isPermaLink="false">http://blogs.bwerp.net/?p=554</guid>
		<description><![CDATA[Automation is good.]]></description>
			<content:encoded><![CDATA[<p>I wrote my first <a href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a> as a proof-of-concept the other day. I often find myself shortcutting up to the location bar to switch between development and production web servers. Here&#8217;s a bookmarklet that toggles &#8220;dev&#8221; and &#8220;www&#8221; subdomains for me, broken into a few lines for readability:</p>
<pre><code>javascript:dL=document.location;
nH=dL.host.split('.')[0]=='www'?'dev':'www';
dL.href=dL.href.replace(/^(https?:\/\/)[^\.]+/i,"$1"+nH);</code></pre>
<p>And in its ready-to-drag-to-your-bookmark-bar version: <a href="\/\/)[^\.]+/i,'$1'+nH);">switch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/554/bookmarklet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

