Skip to content

Instantly share code, notes, and snippets.

@moisespsena
Last active August 29, 2015 14:01
Show Gist options
  • Save moisespsena/01589b22051946ba655a to your computer and use it in GitHub Desktop.
Save moisespsena/01589b22051946ba655a to your computer and use it in GitHub Desktop.
Generate one list with name of book, the book identification and number of chapters and print it to console, in http://bible.com/bible
var data = [];
jQuery("#menu_book UL LI A").each(function() {
var l = $(this);
l.click();
data[data.length] = [
l.text().replace(/(^\s+|\s+$)/g, ''),
l.attr('data-book'),
$("#chapter_selector LI:last").text().replace(/(^\s+|\s+$)/g, '')
]
});
for(var i=0; i < data.length; i++) {
data[i] = data[i].join(";")
}
console.log(data.join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment