Skip to content

Instantly share code, notes, and snippets.

@eeeschwartz
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eeeschwartz/7cb6dc00d6a7cba70e1e to your computer and use it in GitHub Desktop.
Save eeeschwartz/7cb6dc00d6a7cba70e1e to your computer and use it in GitHub Desktop.
Extract descriptions for a day in harvest
<a href="javascript:void(function () {
var jsCode = document.createElement('script');
jsCode.setAttribute('src', 'https://gist.githubusercontent.com/eeeschwartz/7cb6dc00d6a7cba70e1e/raw/extract_harvest_notes.js');
document.body.appendChild(jsCode);
}())">Extract Time</a>
(function(){
var notes = [];
var currentDay = document.getElementsByClassName('js-harvest-current-view')[0];
Array.prototype.forEach.call(currentDay.getElementsByClassName('notes'), function(note) {
notes.push(note.getElementsByTagName('p')[0].innerHTML)
})
alert(notes.join("\n"));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment