1
lorchess.ru/assets/vendor/pgn4web/live-template.html

133 lines
4.9 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>pgn4web live broadcast template</title>
<link href="template.css" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="pawn.ico" />
<script src="pgn4web.js" type="text/javascript"></script>
<script src="engine.js" type="text/javascript"></script>
<script type="text/javascript">
"use strict";
// SetPgnUrl("live.pgn"); // enable this one for real live broadcast using the live-grab.sh script
SetPgnUrl("demoLiveGames.pgn"); // enable this one for live broadcast demo
// SetImagePath("images");
// SetImageType("png");
// SetHighlightOption(true); // true or false
SetGameSelectorOptions(null, true, 0, 0, 0, 15, 15, 3, 0); // (head, num, chEvent, chSite, chRound, chWhite, chBlack, chResult, chDate);
SetCommentsIntoMoveText(false);
SetCommentsOnSeparateLines(false);
SetAutoplayDelay(1000); // milliseconds
// SetAutostartAutoplay(false);
// SetAutoplayNextGame(false); // if set, move to the next game at the end of the current game during autoplay
SetInitialGame("Caruana"); // number of game to be shown at load, from 1 (default); values (keep the quotes) of "first", "last", "random" are accepted; other string values assumed as PGN search string
// SetInitialVariation(0); // number for the variation to be shown at load, 0 (default) for main variation
// make sure each time a game is loaded the last played move is shown
SetInitialHalfmove("end", true); // halfmove number to be shown at load, 0 (default) for start position; values (keep the quotes) of "start", "end", "random", "comment" (go to first comment or variation), "variation" (go to the first variation) are also accepted. Second parameter if true applies the setting to every selected game instead of startup only
SetShortcutKeysEnabled(true);
// set live broadcast; parameters are delay (refresh delay in minutes, 0 means no broadcast, default 0) alertFlag (if true, displays debug error messages, default false) demoFlag (if true starts broadcast demo mode, default false) stepFlag (if true, autoplays updates in steps, default false)
// SetLiveBroadcast(1, false, false, false); // enable this one for real live broadcast using the live-grab.sh script
SetLiveBroadcast(0.25, true, true, false); // enable this one for live broadcast demo
function customFunctionOnPgnGameLoad() {
customPgnHeaderTag("TimeControl", "GameTimeControl");
}
// customShortcutKey_Shift_8 defined by engine.js
// customShortcutKey_Shift_9 defined by engine.js
// customShortcutKey_Shift_0 defined by engine.js
</script>
</head>
<body>
<!-- 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() -->
<h1 style="margin-top:0px; padding-top:0px;">pgn4web live broadcast template</h1>
<table cellpadding=0 cellspacing=0 border=0>
<tr valign=top>
<td width=380>
<div id="GameSelector"></div>
<p></p>
<div id="GameBoard"></div>
<p></p>
<div id="GameButtons"></div>
</td>
<td>
<span class="label">Live broadcast status:</span> <span id="GameLiveStatus"></span>
<br>
<span class="label">Live broadcast refreshed:</span> <span id="GameLiveLastRefreshed"></span>
<br>
<span class="label">Live broadcast received:</span> <span id="GameLiveLastReceived"></span>
<br>
<span class="label">Live broadcast modified (server time):</span> <span id="GameLiveLastModifiedServer"></span>
<p></p>
<span class="label">Event:</span> <span id="GameEvent"></span>
<br>
<span class="label">Site:</span> <span id="GameSite"></span>
<br>
<span class="label">Round:</span> <span id="GameRound"></span>
<br>
<span class="label">Date:</span> <span id="GameDate"></span>
<br>
<span class="label">Time control:</span> <span id="GameTimeControl"></span>
<p></p>
<span class="label">White:</span> <span id="GameWhite"></span>
<br>
<span class="label">White clock:</span> <span id="GameWhiteClock"></span>
<p></p>
<span class="label">Black:</span> <span id="GameBlack"></span>
<br>
<span class="label">Black clock:</span> <span id="GameBlackClock"></span>
<p></p>
<span class="label">Result:</span> <span id="GameResult"></span>
<p></p>
<span class="label">Side to move:</span> <span id="GameSideToMove"></span>
<br>
<span class="label">Last move:</span> <span class="move"><span class="move" id="GameLastMove"></span>&nbsp;</span>
<br>
<span class="label">Next move:</span> <span class="move"><span class="move" id="GameNextMove"></span>&nbsp;</span>
<p></p>
<span class="label">Move comment:</span><br><span id="GameLastComment"></span>
</td>
</tr>
</table>
<p></p>
<hr>
<div style="font-size: 85%; text-align: justify;" id="GameText"></div>
</body>
</html>