forked from ornicar/pgn4web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
live-template.html
118 lines (91 loc) · 4.29 KB
/
live-template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<html>
<!--
pgn4web javascript chessboard
copyright (C) 2009, 2010 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="live-template.css" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="pawn.ico" />
<script src="pgn4web-server-config.js" type="text/javascript"></script>
<script src="pgn4web.js" type="text/javascript"></script>
<script type="text/javascript">
// SetPgnUrl("live.pgn"); // enable this one for real live broadcast using the live-grab.sh script
SetPgnUrl("tilb98r2.pgn"); // enable this one for live broadcast demo
// SetImagePath(""); // use "" path if images are in the same folder as this javascript file
// 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(3000); // milliseconds
// SetAutostartAutoplay(false);
// SetAutoplayNextGame(false); // if set, move to the next game at the end of the current game during autoplay
SetInitialGame("Topalov"); // 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
// 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" and "comment" (go to first comment) are also accepted. Second parameter if true applies the setting to every selected game instead of startup only (default)
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)
// SetLiveBroadcast(1, false, false); // enable this one for real live broadcast using the live-grab.sh script
SetLiveBroadcast(0.25, true, true); // enable this one for live broadcast demo
</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>pgn4web live broadcast template</H1>
<table cellspacing=10>
<tr valign=top>
<td>
<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>
<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 id="GameLastMove"></span></span>
<br>
<span class="label">Next move:</span> <span class="move"><span id="GameNextMove"></span></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>