From: Benjamin Auder Date: Fri, 16 Nov 2018 18:41:52 +0000 (+0100) Subject: Add initial FEN to PGN; shorten end of game window X-Git-Url: https://git.auder.net/doc/html/css/current/scripts/R.css?a=commitdiff_plain;h=762b7c9ca36aedb3e720b31c103be429446060d3;p=vchess.git Add initial FEN to PGN; shorten end of game window --- diff --git a/public/javascripts/base_rules.js b/public/javascripts/base_rules.js index 0a5c0e72..de1a0d0f 100644 --- a/public/javascripts/base_rules.js +++ b/public/javascripts/base_rules.js @@ -1012,7 +1012,7 @@ class ChessRules } // The score is already computed when calling this function - getPGN(mycolor, score) + getPGN(mycolor, score, fenStart) { let pgn = ""; pgn += '[Site "vchess.club"]
'; @@ -1020,7 +1020,8 @@ class ChessRules pgn += '[Date "' + d.getFullYear() + '-' + d.getMonth() + '-' + d.getDate() + '"]
'; pgn += '[White "' + (mycolor=='w'?'Myself':'Anonymous') + '"]
'; pgn += '[Black "' + (mycolor=='b'?'Myself':'Anonymous') + '"]
'; - pgn += '[Result "' + score + '"]
'; + pgn += '[Fen "' + fenStart + '"]
'; + pgn += '[Result "' + score + '"]

'; for (let i=0; i