Last active
August 29, 2015 14:16
-
-
Save asteig/32a985d634bb6960a126 to your computer and use it in GitHub Desktop.
Dribbble Color Mod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$('*').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.