﻿<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs 
    title="Custom gBar"  
    title_url="http://drbeagledotcom.googlepages.com/gbar.xml"
    directory_title="Custom gBar"
    description="
    	Edit your gBar (top left of your page).  This only works on the page with this module.
    	Change links by editing the modules settings.  A comma should link the text and the URL.
    	An example would be Home,http://igoogle.com
    "
    author="Cameron Hall" 
    author_email="drbeagledotcom+modulefeedback@gmail.com"
    author_affiliation="Cornell University Student"
    author_location="Ithaca, NY, USA"
    screenshot="http://drbeagledotcom.googlepages.com/gbar.png"
    thumbnail="http://drbeagledotcom.googlepages.com/gbartb.png"
    author_photo="http://drbeagledotcom.googlepages.com/profile.png"
    author_aboutme="2008 Information Science student at Cornell University. Enjoy doing work, but love getting distracted by google modules."
    author_link="http://drbeagle.com/"
    author_quote="So long, and thanks for all the fish"
    render_inline="required">
		<Require feature="dynamic-height" />
  </ModulePrefs>
	<UserPref
		name="on" 
		display_name="Enabled" 
		datatype="bool" 
		default_value="true" />
	<UserPref
		name="gbar"
		display_name="Links"
		datatype="list"
		required="true"
		default_value = "Gmail,http://mail.google.com/|Calendar,http://calendar.google.com/|Reader,http://reader.google.com/" />
  <Content type="html">
    <![CDATA[
			 <script type="text/javascript">
				 	var prefs = new _IG_Prefs(__MODULE_ID__);
				 	var on = prefs.getBool("on");
				 	if(on){
				 		var html = '<td nowrap=""><b>gBar</b></td>';
				 		var gbar = prefs.getArray("gbar");
				 		for(var i=0; i<gbar.length; i++){
				 			var a = gbar[i].split(",");
				 			html += '<td nowrap=""><a onclick="gbar.close(event)" href="'+a[1]+'">'+a[0]+'</a></td>';
				 		}
					 	//html += '<td nowrap=""><a style="text-decoration: none;" onclick="this.blur();return gbar.toggle(event)" href="#"><u>more</u><span style="font-size: 11px;">&#9660;</span></a></td>';
					 	_gel('gbar').getElementsByTagName('tr')[0].innerHTML = html;
				 	}
			 </script>
    ]]>
  </Content>
</Module>