From: Benjamin Auder Date: Tue, 20 Nov 2018 02:04:37 +0000 (+0100) Subject: Attempt to fix opponent in PGN (should be OK now) X-Git-Url: https://git.auder.net/doc/html/css/pieces/cb.svg?a=commitdiff_plain;h=5e622704f17b93bf2d475f333416df921cf16410;p=vchess.git Attempt to fix opponent in PGN (should be OK now) --- diff --git a/public/javascripts/base_rules.js b/public/javascripts/base_rules.js index 0868a367..a4001225 100644 --- a/public/javascripts/base_rules.js +++ b/public/javascripts/base_rules.js @@ -1030,7 +1030,7 @@ class ChessRules let pgn = ""; pgn += '[Site "vchess.club"]
'; const d = new Date(); - const opponent = this.mode=="human" ? "Anonymous" : "Computer"; + const opponent = mode=="human" ? "Anonymous" : "Computer"; pgn += '[Date "' + d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate() + '"]
'; pgn += '[White "' + (mycolor=='w'?'Myself':opponent) + '"]
'; pgn += '[Black "' + (mycolor=='b'?'Myself':opponent) + '"]
';