מדיה ויקי:Gadget-pgnviewer.js: הבדלים בין גרסאות בדף

מ quick preview
show comments in the right place; allow FirstMove = 0
שורה 338: שורה 338:
for (var i = 0; i < Math.max(this.moves.length, this.comments.length); i++) {
for (var i = 0; i < Math.max(this.moves.length, this.comments.length); i++) {
var move = this.moves[i],
var move = this.moves[i],
comment = this.comments[i];
comment = this.comments[i];
if (comment)
$('<p>', { 'class': 'pgn-comment', text: comment })
.toggleClass( 'pgn-rtl-comment' , rtlregex.test(comment) )
.appendTo( tds.pgnDiv );
if (move && move.s) {
if (move && move.s) {
if (move.a)
if (move.a)
שורה 351: שורה 355:
this.linkOfIndex[i] = link;
this.linkOfIndex[i] = link;
}
}
if (comment)
$('<p>', { 'class': 'pgn-comment', text: comment })
.toggleClass( 'pgn-rtl-comment' , rtlregex.test(comment) )
.appendTo( tds.pgnDiv );
}
}
   
   
שורה 658: שורה 658:
}
}
  this.index = indexOfMove[this.descriptions.FirstMove || 'nofirstnmove'] ||  
  this.index = indexOfMove[this.descriptions.FirstMove || 'nofirstnmove'] ||  
             ( this.descriptions.FEN ? 0 : this.moves.length - 1 );
             ( this.descriptions.FEN || this.descriptions.FirstMove === '0' ? 0 : this.moves.length - 1 );
}
}