Skip to content

Instantly share code, notes, and snippets.

@voidfiles
Created November 25, 2011 23:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voidfiles/1394631 to your computer and use it in GitHub Desktop.
Save voidfiles/1394631 to your computer and use it in GitHub Desktop.
Flickr actionQueue fav handler
F.actionQueue.register('button-bar-fave', {
interim: function(id) {
var fave_button = document.getElementById(id);
if (fave_button.className.search(/fave/) === -1) {
fave_button.className = 'Butt ywa-track fave-button fave';
} else {
fave_button.className = 'Butt ywa-track fave-button';
}
},
cleanup: function(id) {
F.actionQueue['photo-button-bar'].toggle_fave();
}
}, 'photo-button-bar');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment