<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/jquery.color.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,7 @@ TweetManagerConstants = {
 var TweetManager = {
   tweetsCache: [],
   newTweetsCache: [],
-  readTweets: {},
+  unreadTweets: {},
   timerId: null,
   currentError: null,
   currentPage: 1,
@@ -29,10 +29,10 @@ var TweetManager = {
     this.currentError = status;
   },
   readTweet: function(id) {
-    this.readTweets[id] = true;
+    delete this.unreadTweets[id];
   },
   isTweetRead: function(id) {
-    return this.readTweets[id];
+    return !this.unreadTweets[id];
   },
   newTweetsCount: function() {
     return this.newTweetsCache.length;
@@ -57,6 +57,7 @@ var TweetManager = {
 
     for(var i = tweets.length - 1; i &gt;= 0; --i) {
       this.newTweetsCache.unshift(tweets[i]);
+      this.unreadTweets[tweets[i].id] = true;
     }
 
     if(tweets.length &gt; 0) {
@@ -143,7 +144,8 @@ var TweetManager = {
       clearTimeout(this.timerId);
       this.timerId = null;
     }
-    this.tweetsCache =  [];
+    this.unreadTweets = {};
+    this.tweetsCache = [];
     this.newTweetsCache = [];
     this.newTweetsCallback = null;
     this.firstRun = true;
@@ -184,4 +186,10 @@ function signout() {
   TweetManager.clear();
   twitterBackend = null;
 }
+
+if(localStorage.remember &amp;&amp; localStorage.logged) {
+  //Initializing
+  signin(localStorage.username, localStorage.password);
+  TweetManager.giveMeTweets(function() {});
+}
 &lt;/script&gt;</diff>
      <filename>background.html</filename>
    </modified>
    <modified>
      <diff>@@ -187,6 +187,10 @@ a:hover {
   margin-bottom: 3px;
 }
 
+.tweet.unread {
+  background-color: #eed077;
+}
+
 .tweet .user {
   font-size: 9pt;
   color: #666;</diff>
      <filename>css/whisper.css</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@ TwitterLib.prototype = {
       url: TwitterLib.URLS.BASE + url + &quot;.json&quot;,
       data: params,
       dataType: &quot;json&quot;,
-      timeout: 5000,
+      timeout: 6000,
       beforeSend: function(xhr) {
         var auth = $.base64.encode(_this.username + &quot;:&quot; + _this.password);
         xhr.setRequestHeader(&quot;Authorization&quot;, &quot;Basic &quot; + auth);</diff>
      <filename>lib/twitter_lib.js</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,34 @@
 &lt;!--script type=&quot;text/javascript&quot; src=&quot;lib/debug.js&quot;&gt;&lt;/script--&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;lib/twitter_lib.js&quot;&gt;&lt;/script&gt;
 &lt;script&gt;
+$.fn.hoverFor = function(time, mainCallback, startingCallback, abortCallback) {
+  return this.each(function(){
+    var _this = this, timeoutHandle, triggerFired = false;
+    $(this).hover(
+      function() {
+        if(triggerFired)
+          return;
+        if(startingCallback)
+          startingCallback.call(_this);
+        timeoutHandle = setTimeout(function() {
+          triggerFired = true;
+          mainCallback.call(_this);
+          timeoutHandle = null;
+        }, time);
+      },
+      function() {
+        if(triggerFired)
+          return;
+        if(timeoutHandle) {
+          if(abortCallback)
+            abortCallback.call(_this);
+          clearTimeout(timeoutHandle);
+          timeoutHandle = null;
+        }
+      }
+    );
+ });
+};
 
 var tweetManager = chrome.extension.getBackgroundPage().TweetManager;
 var tweetManagerConst = chrome.extension.getBackgroundPage().TweetManagerConstants;
@@ -72,7 +100,7 @@ function openTab(tabUrl) {
 }
 
 function renderTweet(tweet) {
-  var str = '&lt;div class=&quot;tweet&quot;&gt;';
+  var str = '&lt;div id=&quot;tweet_' + tweet.id + '&quot; class=&quot;tweet&quot;&gt;';
   str += '&lt;img src=&quot;' + tweet.user.profile_image_url + '&quot; onclick=&quot;openTab(\'' + TwitterLib.URLS.BASE + tweet.user.screen_name + '\')&quot;&gt;&lt;/img&gt;';
   str += '&lt;a href=&quot;#&quot; class=&quot;user&quot; onclick=&quot;openTab(\'' + TwitterLib.URLS.BASE + tweet.user.screen_name + '\')&quot;&gt;' + tweet.user.screen_name + '&lt;/a&gt;';
   str += '&lt;div class=&quot;text&quot;&gt;' + tweet.text + '&lt;/div&gt;';
@@ -117,6 +145,28 @@ function assemblyTweets(tweets) {
   for(var i = 0; i &lt; transformList.length; ++i) {
     $(&quot;#timeline .tweet .text&quot;).replaceHtml(transformList[i].expression, transformList[i].replacement);
   }
+
+  for(var unreadId in tweetManager.unreadTweets) {
+    $(&quot;#tweet_&quot; + unreadId).addClass('unread');
+  }
+  $(&quot;.tweet.unread&quot;).hoverFor(2000,
+    function() {
+      //Hovering for &lt;time&gt; seconds, let's read it.
+      tweetManager.readTweet(this.id.split('_')[1]);
+      $(this).removeClass('unread');
+    },
+    function() {
+      //Starting countdown to read
+      $(this).animate({
+        backgroundColor: '#ee7'
+      }, 2000);
+    },
+    function() {
+      //Countdown aborted
+      $(this).stop();
+      $(this).css('background-color', '#eed077');
+    }
+  );
 }
 
 function loadTimeline(force) {</diff>
      <filename>popup.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7c25a6d43e6601e785caab71dbc9945826ad6102</id>
    </parent>
  </parents>
  <author>
    <name>Cezar Sa Espinola</name>
    <email>cezarsa@gmail.com</email>
  </author>
  <url>http://github.com/cezarsa/chromed_bird/commit/d488529fac6cb5ce151f01b4e9a8a6e71fbdc68b</url>
  <id>d488529fac6cb5ce151f01b4e9a8a6e71fbdc68b</id>
  <committed-date>2009-11-06T13:37:11-08:00</committed-date>
  <authored-date>2009-11-06T13:37:11-08:00</authored-date>
  <message>Tracking read / unread tweets. closes #4</message>
  <tree>b386fc520801a7a14dca14e081aba53bd4fa3eee</tree>
  <committer>
    <name>Cezar Sa Espinola</name>
    <email>cezarsa@gmail.com</email>
  </committer>
</commit>
