<?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>output stream &#187; JavaScript</title>
	<atom:link href="http://duncanandmeg.org/blogs/code/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://duncanandmeg.org/blogs/code</link>
	<description>riotous events in amateur development</description>
	<lastBuildDate>Fri, 18 Feb 2011 21:28:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to easily add customized links to an intranet page</title>
		<link>http://duncanandmeg.org/blogs/code/2009/12/11/how-to-easily-add-customized-links-to-an-intranet-page/</link>
		<comments>http://duncanandmeg.org/blogs/code/2009/12/11/how-to-easily-add-customized-links-to-an-intranet-page/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 21:50:56 +0000</pubDate>
		<dc:creator>dtjohnso</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://duncanandmeg.org/blogs/code/?p=72</guid>
		<description><![CDATA[For a long time, I always wished I had an easy way to add a custom set of links to my university&#8217;s intranet home page so I could easily access the pages for my current classes. The idea was to have it look something like the image below. Notice the &#8220;Class Links&#8221; section above &#8220;Home.&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>For a long time, I always wished I had an easy way to add a custom set of links to my university&#8217;s intranet home page so I could easily access the pages for my current classes.</p>
<p>The idea was to have it look something like the image below. Notice the &#8220;Class Links&#8221; section above  &#8220;Home.&#8221; The original page only had the &#8220;Home&#8221; section.</p>
<p style="text-align: center;"><img class="size-medium wp-image-73 aligncenter" title="Class links" src="http://duncanandmeg.org/blogs/code/wp-content/uploads/2009/12/endresult.png" alt="Custom class links embedded into my campus home page" width="300" height="201" /></p>
<p>Originally, this seemed to be a bit implausible. Now, thanks to <a href="https://addons.mozilla.org/en-US/firefox/addon/748" class="liexternal">Greasemonkey</a> and <a href="http://instapaper.com" class="liexternal">Instapaper</a>, it&#8217;s actually pretty easy. In fact, the solution I&#8217;ve built is general enough that it could be easily adapted to a number of similar situations where you want an easy way to personalize a set of links on a non-interactive page.</p>
<p>I thought that some of my classmates might be interested in this, so this post is to explain how to adapt my code for yourself. This will require some very basic JavaScript skills at one point, but hopefully I&#8217;ll be able to make that part easy enough.<span id="more-72"></span></p>
<h4>Step 1: Create a list of course pages at instapaper.com</h4>
<p>To begin with, you&#8217;ll need to have an account on instapaper.com. This is where you&#8217;ll store links to your class home pages. If you don&#8217;t have an account, <a href="http://www.instapaper.com/user/register" class="liexternal">sign up now</a>.</p>
<ol>
<li><img class="alignright size-full wp-image-101" title="folders" src="http://duncanandmeg.org/blogs/code/wp-content/uploads/2009/12/folders.png" alt="folders" width="185" height="192" />Once you&#8217;re logged in to instapaper, you&#8217;ll need to make a folder in instapaper to store your class links. I named mine &#8220;Classes.&#8221; You can see an example of my folder structure on the right.</li>
<li>Next, you&#8217;ll need to add the links you want to the Classes folder. Do this by clicking on the folder and using the link to the <a href="http://www.instapaper.com/edit" class="liexternal">&#8220;+ Add&#8221; form</a> at the top of the page, or with the instapaper bookmarklet.</li>
<li>Once you have the links displaying in your &#8220;Classes&#8221; folder as you want them to appear on the school home page, go to the RSS link at the bottom of the page. You&#8217;ll want to copy the RSS feed&#8217;s URL somewhere so you can paste it into your Greasemonkey script in the next step.</li>
</ol>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-105" title="rssURL" src="http://duncanandmeg.org/blogs/code/wp-content/uploads/2009/12/rssURL.png" alt="rssURL" width="389" height="283" /></p>
<h4>Step 2: Install Greasemonkey script</h4>
<p>Now that your links are stored in instapaper, you&#8217;ll need to install my Greasemonkey script to insert them onto the intranet home page. If you don&#8217;t have the Greasemonkey extension installed in your Firefox, go to the <a href="https://addons.mozilla.org/en-US/firefox/addon/748" class="liexternal">Greasemonkey extension page</a> and take care of that.</p>
<p>This step is somewhat more technical, but once done on the computers where you want your links to appear you will never have to do this part again. </p>
<ol>
<li><img class="size-full wp-image-110 alignright" title="newuserscript" src="http://duncanandmeg.org/blogs/code/wp-content/uploads/2009/12/newuserscript.PNG" alt="newuserscript" width="213" height="110" />To begin with, you&#8217;ll need to create a new Greasemonkey script in Firefox. Do this by right-clicking the Greasemonkey icon in the Firefox status bar and selecting &#8220;New user script&#8230;&#8221;</li>
<li>Fill in the box that pops up with the values below.<br />
<blockquote><p><strong>Name: </strong>Insert class links from remote location<br />
<strong>Namespace: </strong>http://www.duncanandmeg.org/<br />
<strong>Includes (one per line):<br />
</strong>http://home.bju.edu/</p>
<p>https://home.bju.edu/</p></blockquote>
</li>
<li>Get the <a href="http://gist.github.com/177199" class="liexternal">current copy of my script from here</a> and paste it in over the new file that pops up on your screen. Save your file.</li>
<li>Find the line in your script that looks like the one below and paste the URL for your instapaper folder&#8217;s RSS feed over my URL.
<p>
<pre><code class=\'prettyprint\' >var feedURL = "http://www.instapaper.com/folder/48337/rss/11185/QBV0RZfH4KBO7GwgrR3D8b7sv90";</code></pre>
</p>
</li>
<li>Save your script and close it.</li>
</ol>
<h4>Finished!</h4>
<p>Now go to the <a href="http://home.bju.edu/" class="liexternal">home.bju.edu</a> to test your script. It should insert a list of class links into the page based on the contents of your folder in instapaper.</p>
<p>In the future, you will not need to edit the Greasemonkey script again. Any changes you make to the contents of your instapaper folder will be automatically reflected in the links displayed on the intranet home page.</p>
]]></content:encoded>
			<wfw:commentRss>http://duncanandmeg.org/blogs/code/2009/12/11/how-to-easily-add-customized-links-to-an-intranet-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

