Skip to content

Instantly share code, notes, and snippets.

@aashutoshrathi
Created December 31, 2017 17:38
Show Gist options
  • Save aashutoshrathi/16d5d2a795247b64e16cbbe5ee22305b to your computer and use it in GitHub Desktop.
Save aashutoshrathi/16d5d2a795247b64e16cbbe5ee22305b to your computer and use it in GitHub Desktop.
Get today's contribution through console.
var today = new Date();
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
x = document.getElementsByTagName('rect');
for(let i = 0; i<x.length; i++) {
if(x[i].getAttribute('data-date') === date) {
console.log(x[i].getAttribute('data-count'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment