Skip to content

Instantly share code, notes, and snippets.

@asteig
Last active August 29, 2015 14:16
Show Gist options
  • Save asteig/32a985d634bb6960a126 to your computer and use it in GitHub Desktop.
Save asteig/32a985d634bb6960a126 to your computer and use it in GitHub Desktop.
Dribbble Color Mod
var shotId = $('.the-shot').data('screenshot_id');
$('.meta-colors').click(function(ev) {
ev.preventDefault();
if($(ev.target).is('img')) {
var colors = '';
$('.color a').each(function() {
colors = colors + $(this).attr('title') + '; ';
});
//would be great if it just copied to clipboard
console.debug(colors);
}
if($(ev.target).is('a')) {
//same here
console.debug( $(ev.target).attr('title') );
}
});
@asteig
Copy link
Author

asteig commented Mar 20, 2015

$('*').unbind('click'); rocks, but not needed in this script. I just put it at the top of all of my stuff in the console so that I don't have to refresh the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment