1
lorchess.ru/assets/vendor/pgn4web/analysis.html

171 lines
7.2 KiB
HTML
Raw Normal View History

2014-02-13 01:44:20 +04:00
<!DOCTYPE HTML>
<html>
<!--
pgn4web javascript chessboard
copyright (C) 2009-2013 Paolo Casaschi
see README file and http://pgn4web.casaschi.net
for credits, license and more details
-->
<head>
<title>0.</title>
<!-- use viewport settings when body.onresize adapts the chessboard to the available space -->
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="pawn.ico" />
<link href="analysis.css" type="text/css" rel="stylesheet" />
<script src="pgn4web.js" type="text/javascript"></script>
<script src="fonts/chess-informant-NAG-symbols.js" type="text/javascript"></script>
<script src="fide-lookup.js" type="text/javascript"></script>
<script type="text/javascript">
"use strict";
var thisRegExp;
thisRegExp = /(&|\?)(help|h)=(true|t)(&|$)/i;
if (window.location.search.match(thisRegExp) !== null) {
alert("pgn4web analysis.html parameters" + "\n" +
" - pgnFile = filename.pgn" + "\n" +
" - initialGame = first | last | random | a number | a search expression (default first)" + "\n" +
" - initialVariation = a number (default 0)" + "\n" +
" - initialHalfmove = start | end | random | comment | variation | a number (default start)" + "\n" +
" - help = true");
}
var pgnFilename = "";
thisRegExp = /(&|\?)(pgnFile|pf)=([^&]*)(&|$)/i;
if (window.location.search.match(thisRegExp) !== null) {
pgnFilename = unescape(window.location.search.match(thisRegExp)[3]);
} else {
// accepts pgnData as alias for pgnFile for consistency with board.html
thisRegExp = /(&|\?)(pgnData|pd)=([^&]*)(&|$)/i;
if (window.location.search.match(thisRegExp) !== null) {
pgnFilename = unescape(window.location.search.match(thisRegExp)[3]);
}
}
if (pgnFilename !== "") { SetPgnUrl(pgnFilename); }
thisRegExp = /(&|\?)(initialGame|ig)=([^&]*)(&|$)/i;
if (window.location.search.match(thisRegExp) !== null) {
SetInitialGame(unescape(window.location.search.match(thisRegExp)[3]));
}
thisRegExp = /(&|\?)(initialVariation|iv)=([^&]*)(&|$)/i;
if (window.location.search.match(thisRegExp) !== null) {
SetInitialVariation(unescape(window.location.search.match(thisRegExp)[3]));
}
thisRegExp = /(&|\?)(initialHalfmove|ih)=([^&]*)(&|$)/i;
if (window.location.search.match(thisRegExp) !== null) {
SetInitialHalfmove(unescape(window.location.search.match(thisRegExp)[3]), false);
}
SetImagePath("images/merida/39");
SetImageType("png");
SetHighlightOption(true);
SetGameSelectorOptions(null, true, 12, 12, 2, 15, 15, 3, 10); // (head, num, chEvent, chSite, chRound, chWhite, chBlack, chResult, chDate);
SetCommentsIntoMoveText(true);
SetCommentsOnSeparateLines(false);
SetAutoplayDelay(1000); // milliseconds
SetAutostartAutoplay(false);
SetAutoplayNextGame(false);
SetShortcutKeysEnabled(true);
// customShortcutKey_Shift_1 defined by fide-lookup.js
// customShortcutKey_Shift_2 defined by fide-lookup.js
function customFunctionOnPgnTextLoad() {
myOnResize();
}
function customFunctionOnPgnGameLoad() {
document.getElementById('GameNum').innerHTML = (currentGame + 1) + '.';
customPgnHeaderTag('WhiteElo', 'GameWhiteElo');
customPgnHeaderTag('BlackElo', 'GameBlackElo');
customPgnHeaderTag('ECO', 'GameECO');
customPgnHeaderTag('Annotator', 'GameAnnotator');
if (document.getElementById('GameWhite').innerHTML && document.getElementById('GameWhiteElo').innerHTML) { document.getElementById('GameWhiteElo').style.marginLeft = '1ex'; }
if (document.getElementById('GameBlack').innerHTML && document.getElementById('GameBlackElo').innerHTML) { document.getElementById('GameBlackElo').style.marginLeft = '1ex'; }
if (document.getElementById('GameSite').innerHTML && document.getElementById('GameEvent').innerHTML) { document.getElementById('GameEvent').style.marginLeft = '1ex'; }
if ((document.getElementById('GameSite').innerHTML || document.getElementById('GameEvent').innerHTML) && document.getElementById('GameDate').innerHTML) { document.getElementById('GameDate').style.marginLeft = '1ex'; }
var newTitle = (currentGame + 1) + '.';
newTitle += '\u00a0 ' + (gameWhite[currentGame] || '?');
newTitle += '\u00a0 ' + (gameBlack[currentGame] || '?');
newTitle += '\u00a0 ' + (gameResult[currentGame] || '?');
if (gameSite[currentGame]) { newTitle += '\u00a0 ' + gameSite[currentGame]; }
if (gameEvent[currentGame]) { newTitle += '\u00a0 ' + gameEvent[currentGame]; }
if (gameDate[currentGame]) { newTitle += '\u00a0 ' + gameDate[currentGame]; }
document.title = simpleHtmlentitiesDecode(newTitle);
}
function searchPlayer(name, FideId) {
if (typeof(openFidePlayerUrl) == "function") { openFidePlayerUrl(name, FideId); }
}
function myOnResize() {
var ww, wh, theObj;
if (window.innerWidth && window.innerHeight) { ww = window.innerWidth; wh = window.innerHeight; }
else if (document.documentElement && document.documentElement.clientWidth) { ww = document.documentElement.clientWidth; wh = document.documentElement.clientHeight; }
else if (document.body && document.body.clientWidth) { ww = document.body.clientWidth; wh = document.body.clientHeight; }
else { return; }
if (theObj = document.getElementById("GameTextResult")) { theObj.style.height = (wh - 60) + "px"; }
autoScrollToCurrentMoveIfEnabled();
}
enableAutoScrollToCurrentMove("GameTextResult");
</script>
</head>
<body onResize="myOnResize();">
<!-- paste your PGN below and make sure you dont specify an external source with SetPgnUrl() -->
<form style="display: none;"><textarea style="display: none;" id="pgnText">
</textarea></form>
<!-- paste your PGN above and make sure you dont specify an external source with SetPgnUrl() -->
<div class="boardheaderDiv" id="boardHeader">
<table cellspacing=0 cellpadding=0 border=0><tr>
<td><div class="headerLine gameNum" id="GameNum" title="game number">1.</div></td>
<td><div class="headerLine gameECO" id="GameECO" title="opening"></div></td>
</tr></table>
<div class="shortRowSpace">&nbsp;</div>
<div class="headerLine" title="white player"><a id="GameWhite" href="javascript:void(0);" onclick="searchPlayer(this.innerHTML, customPgnHeaderTag('WhiteFideId')); this.blur();"></a><span id="GameWhiteElo"></span></div>
<div class="headerLine" title="black player"><a id="GameBlack" href="javascript:void(0);" onclick="searchPlayer(this.innerHTML, customPgnHeaderTag('BlackFideId')); this.blur();"></a><span id="GameBlackElo"></span></div>
<div class="shortRowSpace">&nbsp;</div>
<div class="headerLine gameSiteEventDate" title="event details"><span id="GameSite"></span><span id="GameEvent"></span><span id="GameDate"></span></div>
<div class="shortRowSpace">&nbsp;</div>
<div class="shortRowSpace">&nbsp;</div>
<div id="GameBoard"></div>
<div class="shortRowSpace">&nbsp;</div>
<div class="shortRowSpace">&nbsp;</div>
<div class="gameLastMove">
<span id="GameLastMove" title="last move"></span>&nbsp;&nbsp;<span id="GameLastVariations" title="last move alternatives"></span>&nbsp;
</div>
</div>
<div class="topSpacer">&nbsp;</div>
<div class="gametextresultDiv" id="GameTextResult">
<div id="GameText"></div>
<div class="gameAnnotator" id="GameAnnotator" title="annotator"></div>
<div id="GameResult" title="result"></div>
</div>
</body>
</html>