Skip to content

Instantly share code, notes, and snippets.

@sobelk
Created March 7, 2010 21:50
Show Gist options
  • Save sobelk/324662 to your computer and use it in GitHub Desktop.
Save sobelk/324662 to your computer and use it in GitHub Desktop.
// Cause a Fluid/Growl notification on Lala song change.
// I execute the following in the Firebug console with the Lala tab active.
// I would like to package it as a Jetpack, extension, or bundle it
// with an existing Lala extension.
// Yip implements the fluid/growl API on my computer.
function showLalaSongNotification(song) {
window.fluid.showGrowlNotification({
title: song.title,
description: song.artist,
icon: 'http://album-images.lala.com/servlet/ArtWorkServlet/' +
song.discLalaId + '/xs'
});
}
Player.g._onLoadTrack = Player.g.onLoadTrack;
Player.g.onLoadTrack = function (track) {
showLalaSongNotification(track.data.result.song);
Player.g._onLoadTrack(track);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment