Last active
November 26, 2015 01:09
-
-
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.
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
$('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