Skip to content

Instantly share code, notes, and snippets.

@joeheyming
Last active November 26, 2015 01:09
Show Gist options
  • Save joeheyming/26b100fb5aae14580d19 to your computer and use it in GitHub Desktop.
Save joeheyming/26b100fb5aae14580d19 to your computer and use it in GitHub Desktop.
Paste this code into your developer tools when looking at github contributions. Click the cells you want to highlight.
$('rect').click(function(e) {
var target = e.target,
$target = $(target);
if (target.count === undefined || target.count === 5) {
target.count = 0;
}
if (target.count === 0) {
$target.attr('fill', '#eeeeee');
} else if (target.count === 1) {
$target.attr('fill', '#d6e685');
} else if (target.count === 2) {
$target.attr('fill', '#8cc665');
} else if (target.count === 3) {
$target.attr('fill', '#44a340');
} else if (target.count === 4) {
$target.attr('fill', '#1e6823');
}
target.count++;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment