As many of you may already know, I am a Digg.com junkie. In fact, many of the articles and other information I read on the regular basis originate from articles posted on Digg. One of the cool features that Digg has is something known as Digg Spy. When you navigate your browser of choice to that page, it provides a real-time view into activity on Digg.com, such as stories being submitted or 'dugg'.

Well, I thought that was a pretty nifty idea so I spent about 8 hours applying that same idea to the Music section of this website. The music section of this site contains a 'Recent Tracks' menu on the left hand side of the page. Using some RJS and the periodically_call_remote() helper method in RoR, I managed to slap something together that works. Really, it does work, at least in Safari, Firefox, and my favorite...Internet Explorer.

Now, let me explain how this works. Let's say you find yourself somewhere in the Music section of this site. If a song is played while you are on a page, that menu will automatically flash yellow and fade away. It automatically checks every 60 seconds.

I actually stayed up until 6am this morning trying to work out the kinks. For the most part, I had it all working around 2am last night. Between 2-6am, I was in the rubyonrails IRC channel trying to track down a bug with the Effect.Highlight function. You see, the menu would be updated and flash yellow just like I wanted it to, but then I would lose the :hover functionality where the element changes to a white background when hovered over.

Long story short, I ditched the Effect.Highlight function and went with Effect.Appear with some other RJS'ish stuff that gets the same thing done. Alright, that's all the new features I can code up this weekend, if there are any bugs, please lemme know.

Current Rating: 4.0 rating from 1 vote

  • Current rating is 4
  •  
  •  
  •  
  •  
  •  

No Responses to "Music Spy"

Comments are Closed

Name: (Required)
Website:
Comment:
Remember my info