1<!DOCTYPE HTML> 2<html> 3 4<!-- 5 pgn4web javascript chessboard 6 copyright (C) 2009-2015 Paolo Casaschi 7 see README file and http://pgn4web.casaschi.net 8 for credits, license and more details 9--> 10 11<head> 12 13<title>pgn4web live broadcast template</title> 14 15<link href="template.css" type="text/css" rel="stylesheet" /> 16 17<link rel="icon" sizes="16x16" href="pawn.ico" /> 18 19<script src="pgn4web.js" type="text/javascript"></script> 20<script src="engine.js" type="text/javascript"></script> 21 22<script type="text/javascript"> 23 "use strict"; 24 25// SetPgnUrl("live.pgn"); // enable this one for real live broadcast using the live-grab.sh script 26 SetPgnUrl("demoLiveGames.pgn"); // enable this one for live broadcast demo 27 28// SetImagePath("images"); 29// SetImageType("png"); 30// SetHighlightOption(true); // true or false 31 32 SetGameSelectorOptions(null, true, 0, 0, 0, 15, 15, 3, 0); // (head, num, chEvent, chSite, chRound, chWhite, chBlack, chResult, chDate); 33 34 SetCommentsIntoMoveText(false); 35 SetCommentsOnSeparateLines(false); 36 SetAutoplayDelay(1000); // milliseconds 37// SetAutostartAutoplay(false); 38// SetAutoplayNextGame(false); // if set, move to the next game at the end of the current game during autoplay 39 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 40// SetInitialVariation(0); // number for the variation to be shown at load, 0 (default) for main variation 41 42 // make sure each time a game is loaded the last played move is shown 43 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 44 45 SetShortcutKeysEnabled(true); 46 47 // 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) endlessFlag (if true, keeps polling for new moves even after all games are finished) 48// SetLiveBroadcast(1); // enable this one for real live broadcast 49 SetLiveBroadcast(0.25, true, true); // enable this one for live broadcast demo 50 51 function customFunctionOnPgnGameLoad() { 52 customPgnHeaderTag("TimeControl", "GameTimeControl"); 53 } 54 55 // customShortcutKey_Shift_8 defined by engine.js 56 // customShortcutKey_Shift_9 defined by engine.js 57 // customShortcutKey_Shift_0 defined by engine.js 58 59</script> 60 61</head> 62 63<body> 64 65<!-- paste your PGN below and make sure you dont specify an external source with SetPgnUrl() --> 66<form style="display: none;"><textarea style="display: none;" id="pgnText"> 67 68</textarea></form> 69<!-- paste your PGN above and make sure you dont specify an external source with SetPgnUrl() --> 70 71<h1 style="margin-top:0px; padding-top:0px;">pgn4web live broadcast template</h1> 72 73<table cellpadding=0 cellspacing=0 border=0> 74<tr valign=top> 75 76<td width=380> 77<div id="GameSelector"></div> 78<p></p> 79<div id="GameBoard"></div> 80<p></p> 81<div id="GameButtons"></div> 82</td> 83 84<td> 85<span class="label">Live broadcast status:</span> <span id="GameLiveStatus"></span> 86<br> 87<span class="label">Live broadcast refreshed:</span> <span id="GameLiveLastRefreshed"></span> 88<br> 89<span class="label">Live broadcast received:</span> <span id="GameLiveLastReceived"></span> 90<br> 91<span class="label">Live broadcast modified (server time):</span> <span id="GameLiveLastModifiedServer"></span> 92<p></p> 93<span class="label">Event:</span> <span id="GameEvent"></span> 94<br> 95<span class="label">Site:</span> <span id="GameSite"></span> 96<br> 97<span class="label">Round:</span> <span id="GameRound"></span> 98<br> 99<span class="label">Date:</span> <span id="GameDate"></span> 100<br> 101<span class="label">Time control:</span> <span id="GameTimeControl"></span> 102<p></p> 103<span class="label">White:</span> <span id="GameWhite"></span> 104<br> 105<span class="label">White clock:</span> <span id="GameWhiteClock"></span> 106<p></p> 107<span class="label">Black:</span> <span id="GameBlack"></span> 108<br> 109<span class="label">Black clock:</span> <span id="GameBlackClock"></span> 110<p></p> 111<span class="label">Result:</span> <span id="GameResult"></span> 112<p></p> 113<span class="label">Side to move:</span> <span id="GameSideToMove"></span> 114<br> 115<span class="label">Last move:</span> <span class="move"><span class="move" id="GameLastMove"></span> </span> 116<br> 117<span class="label">Next move:</span> <span class="move"><span class="move" id="GameNextMove"></span> </span> 118<p></p> 119<span class="label">Move comment:</span><br><span id="GameLastComment"></span> 120</td> 121 122</tr> 123</table> 124 125<p></p> 126<hr> 127 128<div style="font-size: 85%; text-align: justify;" id="GameText"></div> 129 130</body> 131 132</html> 133