מדיה ויקי:Gadget-pgnviewer.js: הבדלים בין גרסאות בדף
as it turns out, toggle wants a real boolean to work correctly. |
DK |
||
| שורה 145: | שורה 145: | ||
var game = this.allGames[val]; | var game = this.allGames[val]; | ||
if (game) { | if (game) { | ||
var hasComment = function(n){ return n.hasClass('pgn-comment'); }, | game.analyzePgn(); | ||
var hasComment = function( n ){ return n.hasClass( 'pgn-comment' ); }, | |||
hasComments = game.notations.filter( hasComment ).length; | hasComments = game.notations.filter( hasComment ).length; | ||
this.currentGame = game; | this.currentGame = game; | ||
this.ccButton.setVisible( hasComments ); | this.ccButton.setVisible( hasComments ); | ||