<?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>some words from technology briefcase &#187; javascript</title>
	<atom:link href="http://blog.fltlab.net/index.php/category/dev/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fltlab.net</link>
	<description>...nerd news for new nerds...</description>
	<lastBuildDate>Wed, 14 Sep 2011 09:30:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Mozilla Firefox and Jetpack</title>
		<link>http://blog.fltlab.net/index.php/2010/02/01/jetpack-example/</link>
		<comments>http://blog.fltlab.net/index.php/2010/02/01/jetpack-example/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 13:12:45 +0000</pubDate>
		<dc:creator>Adriano Tornatore</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Jetpack]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://blog.fltlab.net/?p=1</guid>
		<description><![CDATA[A new type of &#8220;Browser Customization&#8221; tool started to be a real developing tool for addons in Mozilla Firefox. Mozilla Labs released the version 0.7 of Jetpack! I will not explain how to use and how to install it (you could even watch video tutorial on the website) but i will show a little example [...]]]></description>
			<content:encoded><![CDATA[<pre><p>A new type of &#8220;Browser Customization&#8221; tool started to be a real developing tool for addons in Mozilla Firefox.<br />
Mozilla Labs released the version 0.7 of <a title="Jetpack - Mozilla Labs" href="http://jetpack.mozillalabs.com" target="_blank">Jetpack</a>!</p>
<p>I will not explain how to use and how to install it (you could even watch video tutorial on the website) but i will show a little example of it.</p>
<p>Once you installed Jetpack, a special tab (about:jetpack) will appear with several tabs: a smart description, a list of installed Jetpack addons, a developing window, tutorial with some demos, memory usage monitor and api tutorial.  In tutorial tab there are examples about scripting under this API but not all are working..</p>
<p>Anyway, there is a script that is checking every minute how many unread mails you have in your gmail account and it shows an icon on your mozilla status bar.  I edited it a little bit and now it will show a toast notification if new mails arrived.  Here the code:</p>
<p><span id="more-1"></span></p>
<blockquote>
<pre>var oldcount = 0;
var yenivar = false;
function GmailNotifier(doc){
 $(doc).click( this.goToInbox );
 this.update( doc );
 var sd = this;
 setInterval( function(){
 sd.update(doc);
 }, 60*1000 ); //requesting time
}

GmailNotifier.prototype = {
 goToInbox: function(){
 jetpack.tabs.open("http://mail.google.com"); //how to open a new tab
 jetpack.tabs[ jetpack.tabs.length-1 ].focus(); //and how to focus on it
 },

 update: function(doc){
 var url = "http://mail.google.com/mail/feed/atom";
 doc = $(doc);
 $.get( url, function(xml){
 var el = $(xml).find("fullcount"); // Unread message count

 if( el ){
 var count = el.get(0).textContent;
 if(oldcount&lt;count){
 yenivar = true;
 oldcount = count;
 }
 else
 yenivar = false;
 doc.find("#count").text( count );
 if(yenivar)
 jetpack.notifications.show('You got a Mail!'); //this displays the toast notification
 }
 else{
 doc.find("#count").text( "Login" );
 }
 });
 }
}

//with the following instruction it appends html code to status bar
//passing this json object to jetpack.statusBar.append method

jetpack.statusBar.append({
 html: '&lt;img src="http://mail.google.com/mail/images/favicon.ico"&gt;&lt;span id="count"&gt;&lt;/span&gt;',
 onReady: function(doc){
 var gmail = new GmailNotifier(doc);
 $("#count", doc).css({
 position: "absolute",
 left: 4, top: 8,
 fontSize: "10px",
 cursor: "pointer",
 backgroundColor: "rgba(255,255,255,.8)"
 });
 },
 width: 20
});

//end</pre>
</blockquote>
<p>It&#8217;s so easy to test a custom script like this (just click on &#8220;try out this code&#8221; button under your developing window) but be careful on endless loop!!</p>
<p>Keep studying this API&#8230;</p>
</pre>]]></content:encoded>
			<wfw:commentRss>http://blog.fltlab.net/index.php/2010/02/01/jetpack-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Extend a TextBox to use Google Maps</title>
		<link>http://blog.fltlab.net/index.php/2010/01/09/how-to-extend-a-textbox-to-use-google-maps/</link>
		<comments>http://blog.fltlab.net/index.php/2010/01/09/how-to-extend-a-textbox-to-use-google-maps/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 00:34:12 +0000</pubDate>
		<dc:creator>flotruglio</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[codeproject]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[textbox]]></category>

		<guid isPermaLink="false">http://blog.fltlab.net/?p=32</guid>
		<description><![CDATA[Do you need to store latitude/longitude coordinates of an address, or show a little input to choose a point in Google Maps? Here is a little solution to this problem: extend the TextBox to interact with Google Maps! read my full post at http://www.codeproject.com/KB/custom-controls/gmapinput.aspx]]></description>
			<content:encoded><![CDATA[<pre><p><span style="font-family: arial,verdana;font-size: x-small">Do you need to store latitude/longitude coordinates of an address, or show a little input to choose a point in Google Maps? Here is a little solution to this problem: extend the TextBox to interact with Google Maps! </span></p>
<p><span style="font-family: arial,verdana;font-size: x-small">read my full post at </span><a href="http://www.codeproject.com/KB/custom-controls/gmapinput.aspx" target="_blank">http://www.codeproject.com/KB/custom-controls/gmapinput.aspx</a></p>
</pre>]]></content:encoded>
			<wfw:commentRss>http://blog.fltlab.net/index.php/2010/01/09/how-to-extend-a-textbox-to-use-google-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

