<?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>Guy Rutenberg &#187; Greasemonkey</title>
	<atom:link href="http://www.guyrutenberg.com/tag/greasemonkey/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guyrutenberg.com</link>
	<description>Keeping track of what I do</description>
	<lastBuildDate>Wed, 16 Jun 2010 19:53:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Greasemonkey Fix to the Top Menu in Sheilta (Open University)</title>
		<link>http://www.guyrutenberg.com/2008/04/14/a-greasemonkey-fix-to-the-top-menu-in-sheilta-open-university/</link>
		<comments>http://www.guyrutenberg.com/2008/04/14/a-greasemonkey-fix-to-the-top-menu-in-sheilta-open-university/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 04:34:02 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Greasemonkey]]></category>
		<category><![CDATA[OpenU]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/2008/04/14/a-greasemonkey-fix-to-the-top-menu-in-sheilta-open-university/</guid>
		<description><![CDATA[Following comments in Fixing the Home Link in the Telem System (Open U) I&#8217;ve decided to fix the top bar links in the Sheilta system too.
The links in the top bar are javascript links that open in a new window when clicked. My Greasemonkey script turns them into regular links that you can open in [...]]]></description>
			<content:encoded><![CDATA[<p>Following comments in <a href="http://www.guyrutenberg.com/2008/02/10/fixing-the-home-link-in-the-telem-system-openu/">Fixing the Home Link in the Telem System (Open U)</a> I&#8217;ve decided to fix the top bar links in the Sheilta system too.</p>
<p>The links in the top bar are javascript links that open in a new window when clicked. My Greasemonkey script turns them into regular links that you can open in a new tab.</p>
<p><span id="more-50"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// sheilta.user.js</span>
<span style="color: #006600; font-style: italic;">// version 0.1 </span>
<span style="color: #006600; font-style: italic;">// 2008-04-13</span>
<span style="color: #006600; font-style: italic;">// Copyright (c) 2008, Guy Rutenberg</span>
<span style="color: #006600; font-style: italic;">// Released under the GPL license</span>
<span style="color: #006600; font-style: italic;">// http://www.gnu.org/copyleft/gpl.html</span>
<span style="color: #006600; font-style: italic;">//</span>
<span style="color: #006600; font-style: italic;">// ==UserScript==</span>
<span style="color: #006600; font-style: italic;">// @name          Top menu fix for the Open University's Sheilta system.</span>
<span style="color: #006600; font-style: italic;">// @namespace     http://www.guyrutenberg.org/</span>
<span style="color: #006600; font-style: italic;">// @description   Fixes the top menu in the Open University's Sheilta system.</span>
<span style="color: #006600; font-style: italic;">// @include       https://sheilta.apps.openu.ac.il/*</span>
<span style="color: #006600; font-style: italic;">// ==/UserScript==</span>
&nbsp;
&nbsp;
tds <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'td'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>tds<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>tds.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">className</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;atext&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">attributes</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">attributes</span>.<span style="color: #660066;">getNamedItem</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'onclick'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		onclick <span style="color: #339933;">=</span> tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">attributes</span>.<span style="color: #660066;">getNamedItem</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'onclick'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">nodeValue</span><span style="color: #339933;">;</span>
		re <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/window.open\(&quot;(.*?)&quot;,/</span>
		match <span style="color: #339933;">=</span> re.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>onclick<span style="color: #009900;">&#41;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>match<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">href</span><span style="color: #339933;">=</span>match<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">attributes</span>.<span style="color: #660066;">getNamedItem</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'onclick'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">nodeValue</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
		tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">target</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'_top'</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">data</span><span style="color: #339933;">==</span><span style="color: #3366CC;">'הכימת'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			tds<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">href</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'/pls/dmyopt2/mabasheilta.hadracha'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I hope you will find this script useful. I didn&#8217;t find any major bugs, but there may be some. If you find one, please report it to me via the comments or email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2008/04/14/a-greasemonkey-fix-to-the-top-menu-in-sheilta-open-university/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing the Home Link in the Telem System (OpenU)</title>
		<link>http://www.guyrutenberg.com/2008/02/10/fixing-the-home-link-in-the-telem-system-openu/</link>
		<comments>http://www.guyrutenberg.com/2008/02/10/fixing-the-home-link-in-the-telem-system-openu/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 08:55:20 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Greasemonkey]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[OpenU]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/2008/02/10/fixing-the-home-link-in-the-telem-system-openu/</guid>
		<description><![CDATA[This post can be helpful for students of the Open University of Israel. As a student there, I found it very annoying that the link to the courses&#8217; homepage in the Telem system is a JavaScript link. This prevents it from opening in a new tab, and thus require various workarounds to get back to [...]]]></description>
			<content:encoded><![CDATA[<p>This post can be helpful for students of the <a href="http://www.openu.ac.il">Open University of Israel</a>. As a student there, I found it very annoying that the link to the courses&#8217; homepage in the Telem system is a JavaScript link. This prevents it from opening in a new tab, and thus require various workarounds to get back to the homepage in a different tab. So, a little while ago I wrote a little Greasemonkey script to fix it.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// telem.user.js</span>
<span style="color: #006600; font-style: italic;">// version 0.1 </span>
<span style="color: #006600; font-style: italic;">// 2008-01-01</span>
<span style="color: #006600; font-style: italic;">// Copyright (c) 2008, Guy Rutenberg</span>
<span style="color: #006600; font-style: italic;">// Released under the GPL license</span>
<span style="color: #006600; font-style: italic;">// http://www.gnu.org/copyleft/gpl.html</span>
<span style="color: #006600; font-style: italic;">//</span>
<span style="color: #006600; font-style: italic;">// ==UserScript==</span>
<span style="color: #006600; font-style: italic;">// @name          OpenU's Telem - Fix Home Button</span>
<span style="color: #006600; font-style: italic;">// @namespace     http://www.guyrutenberg.org/</span>
<span style="color: #006600; font-style: italic;">// @description   Fixes the home button link in the telem system of the OpenU.</span>
<span style="color: #006600; font-style: italic;">// @include       http://maagar.openu.ac.il/opus/*</span>
<span style="color: #006600; font-style: italic;">// ==/UserScript==</span>
&nbsp;
&nbsp;
<span style="color: #000066;">home</span> <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">home</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	re <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/javascript:find_home_page\('(.*?)','(.*?)',/</span>
	match <span style="color: #339933;">=</span> re.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">home</span>.<span style="color: #660066;">href</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000066;">home</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://telem.openu.ac.il/courses/'</span><span style="color: #339933;">+</span>match<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'/'</span><span style="color: #339933;">+</span>match<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This script changes the link to a regular non-JavaScript link. I&#8217;ve tested it for more than a month now, without finding any bugs. However if you find something, or have any suggestion, please comment. </p>
<p>Update: See <a href="/2008/04/14/a-greasemonkey-fix-to-the-top-menu-in-sheilta-open-university/">A Greasemonkey Fix to the Top Menu in Sheilta (Open University)</a>, it has a fix for the top menu bar in the Sheilta system</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2008/02/10/fixing-the-home-link-in-the-telem-system-openu/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.440 seconds -->
