\n");
$.getJSON(chrome.extension.getURL('contents.json'), function(data) {
//console.log(data);
var channelContents = data.contents;
$.each(channelContents, function( index, block ) {
var datetime = new Date(block.created_at).toLocaleDateString();
blocks[index] = "
\n"
+ "
\n"
+ "\n"
+ ( block.content_html ? ""+ block.content_html + "
\n" : "" )
+ ( block.image ? "\n" : "" )
+ "\n"
+ "\n"
+ "
";
});
});
//console.log(blocks);
$.get(chrome.extension.getURL('head.html'), function( head ) {
$( "head" ).html( head );
});
$.get(chrome.extension.getURL('body.html'), function( pages ) {
$( "body" ).html( pages );
$( "#pages" ).append(firstPage);
$.each(blocks, function( index, block ) {
$( "#pages" ).append(block);
});
});
// Print
//window.print();