|
|
|
@ -53,12 +53,12 @@ function create_each_block ( root, each_block_value, comment, comment_index, com
|
|
|
|
|
var span = createElement( 'span' );
|
|
|
|
|
appendNode( span, div );
|
|
|
|
|
span.className = "meta";
|
|
|
|
|
var last_text = comment.author;
|
|
|
|
|
var text = createText( last_text );
|
|
|
|
|
var text_value = comment.author;
|
|
|
|
|
var text = createText( text_value );
|
|
|
|
|
appendNode( text, span );
|
|
|
|
|
appendNode( createText( " wrote " ), span );
|
|
|
|
|
var last_text_2 = root.elapsed(comment.time, root.time);
|
|
|
|
|
var text_2 = createText( last_text_2 );
|
|
|
|
|
var text_2_value = root.elapsed(comment.time, root.time);
|
|
|
|
|
var text_2 = createText( text_2_value );
|
|
|
|
|
appendNode( text_2, span );
|
|
|
|
|
appendNode( createText( " ago:" ), span );
|
|
|
|
|
appendNode( createText( "\n\n\t\t" ), div );
|
|
|
|
@ -66,8 +66,8 @@ function create_each_block ( root, each_block_value, comment, comment_index, com
|
|
|
|
|
appendNode( raw_before, div );
|
|
|
|
|
var raw_after = createElement( 'noscript' );
|
|
|
|
|
appendNode( raw_after, div );
|
|
|
|
|
var last_raw = comment.html;
|
|
|
|
|
raw_before.insertAdjacentHTML( 'afterend', last_raw );
|
|
|
|
|
var raw_value = comment.html;
|
|
|
|
|
raw_before.insertAdjacentHTML( 'afterend', raw_value );
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
mount: function ( target, anchor ) {
|
|
|
|
@ -75,17 +75,17 @@ function create_each_block ( root, each_block_value, comment, comment_index, com
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
update: function ( changed, root, each_block_value, comment, comment_index ) {
|
|
|
|
|
if ( last_text !== ( last_text = comment.author ) ) {
|
|
|
|
|
text.data = last_text;
|
|
|
|
|
if ( text_value !== ( text_value = comment.author ) ) {
|
|
|
|
|
text.data = text_value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( last_text_2 !== ( last_text_2 = root.elapsed(comment.time, root.time) ) ) {
|
|
|
|
|
text_2.data = last_text_2;
|
|
|
|
|
if ( text_2_value !== ( text_2_value = root.elapsed(comment.time, root.time) ) ) {
|
|
|
|
|
text_2.data = text_2_value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( last_raw !== ( last_raw = comment.html ) ) {
|
|
|
|
|
if ( raw_value !== ( raw_value = comment.html ) ) {
|
|
|
|
|
detachBetween( raw_before, raw_after );
|
|
|
|
|
raw_before.insertAdjacentHTML( 'afterend', last_raw );
|
|
|
|
|
raw_before.insertAdjacentHTML( 'afterend', raw_value );
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|