-
Notifications
You must be signed in to change notification settings - Fork 6
/
help.html
237 lines (198 loc) · 9.72 KB
/
help.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<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 help</title>
<style type="text/css">
html,
body {
font-family: sans-serif;
color: black;
background: white;
padding: 10px;
}
a {
text-decoration: none;
color: black;
}
</style>
<link rel="shortcut icon" href="pawn.ico" />
</head>
<body>
<script type="text/javascript">
function print_menu( item, level, title ) {
menu = '<table width=100% cellspacing=0 cellpadding=0><tr><td valign=top>';
menu += '<h' + level + '>' + title + '</h' + level + '>';
menu += '</td><td valign=top>';
menu += '<div style="font-size: 66%; text-align: right">';
menu += '<a name="' + item + '" href=#ui>user interface</a>';
menu += ' <a href=#squares>shortcut squares</a>';
menu += ' <a href=#keys>shortcut keys</a>';
menu += ' <a href=#search>search tool</a>';
menu += ' <a href=#credits>credits & license</a>';
menu += '</div>';
menu += '</td></tr></table>';
document.write(menu);
}
function print_help_row (one, two) {
document.write("<tr><td style='text-align: left; vertical-align: top; padding-left:40; white-space:nowrap;'>" + one + "</td><td style='text-align: left; vertical-align: top; padding-left:20'>" + two + "</td></tr>");
}
try {
displayVersion = 'v' + opener.pgn4web_version;
} catch(e) {
displayVersion = '';
}
try {
isRotated = opener.IsRotated;
} catch(e) {
isRotated = false;
}
if (isRotated) {
colorAtTheBottom = "Black";
shortcutSquareKeyEnable = "A2";
shortcutSquareSearchPopup = "G4";
shortcutSquareSearchRepeat = "F4";
shortcutSquareSearchRepeatBackward = "H4";
rowNumbers = "87654321";
colLetters = "HGFEDCBA";
} else {
colorAtTheBottom = "White";
shortcutSquareKeyEnable = "H7";
shortcutSquareSearchPopup = "B5";
shortcutSquareSearchRepeat = "C5";
shortcutSquareSearchRepeatBackward = "A5";
rowNumbers = "12345678";
colLetters = "ABCDEFGH";
}
</script>
<table name="top" width=100% cellspacing=0 cellpadding=0><tr>
<td align=left valign=middle>
<h1> pgn4web help</h1>
</td><td align=right valign=middle>
<img src=pawns.png border=0>
</td></tr></table>
<div style="height: 1em"> </div>
<script type="text/javascript">print_menu("ui", 2, "user interface");</script>
The user can interact with the pgn4web chessboard <a href="#keys">using the keyboard</a> or <a href="#squares">clicking chessboard squares</a>; hovering the mouse on each square displays an help summary.
<p></p>
A <a href="#search">search tool</a> allows seraching within the PGN games.
<p></p>
Errors alert messages are logged, such as failures to load PGN games, incorrect PGN games or incorrect FEN strings. When an error is encountered, the top left chessboard square will flash to signal the exception. The error alert log can be reviewed clicking on the same top left chessboard square.
<p></p>
<br>
<script type="text/javascript">print_menu("squares", 2, "shortcut squares");</script>
<script type="text/javascript">
document.write("<table style='padding:0;' border=0>");
try {
for (r=7; r>=0; r--) {
rowDisplayed = false;
for (c=0; c<=7; c++) {
if (opener.boardTitle[c][r] !== "") {
print_help_row(colLetters.charAt(c) + rowNumbers.charAt(7-r), opener.boardTitle[c][r]);
rowDisplayed = true;
}
}
if (rowDisplayed) { print_help_row(" ", ""); }
}
document.write("</table>");
document.write("<i>Squares labeled assuming " + colorAtTheBottom + " on bottom.</i>");
} catch (e) {
print_help_row("shortcut squares info not available from the opener window", "");
print_help_row("please hover the mouse pointer on each square of the chessboard to check for their shortcut action", "");
document.write("</table>");
}
</script>
<p></p>
<br>
<script type="text/javascript">print_menu("keys", 2, "shortcut keys");</script>
<script type="text/javascript">
document.write("<table style='padding:0;' border=0>");
print_help_row("h , l", "game start, end (also arrow up, down keys)");
print_help_row("u, i", "find previous, next comment");
print_help_row("j , k", "move backward, forward (also arrow left, right keys)");
print_help_row(" ", "");
print_help_row("a", "start autoplay");
print_help_row("0", "stop autoplay");
print_help_row("1, 2...", "autoplay 1 sec, 2 sec...");
print_help_row(" ", "");
print_help_row("v, m", "load first, last game");
print_help_row("b, n", "load previous, next game");
print_help_row("c, x", "load random game, random game at random ply");
print_help_row(" ", "");
print_help_row("s", "search prompt");
print_help_row("enter", "repeat last search");
print_help_row("shift-enter", "repeat last search backward");
print_help_row(" ", "");
print_help_row("r, y", "pause, restart live broadcast automatic refresh");
print_help_row("t", "force games refresh during live broadcast");
print_help_row(" ", "");
print_help_row("p", "toggle comments");
print_help_row("o", "toggle comments on separate lines");
print_help_row(" ", "");
print_help_row("g", "toggle highlighting");
print_help_row("f, d", "flip board, White on bottom");
print_help_row(" ", "");
print_help_row("z", "pgn4web debug info");
print_help_row("shift-z", "pgn4web website");
print_help_row("esc", "pgn4web help");
print_help_row("shift-esc", "toggle enabling shortcut keys");
print_help_row(" ", "");
document.write("</table>");
try {
if (opener.shortcutKeysEnabled) {
ke_curr = "enabled";
ke_next = "disable";
} else {
ke_curr = "disabled";
ke_next = "enable";
}
document.write('<i>Shorcut keys currently ' + ke_curr + ', ' + ke_next +
' in the chessboard with shift+escape or clicking square ' +
shortcutSquareKeyEnable + ' (assuming ' +
colorAtTheBottom + ' on bottom).</i>\n');
} catch (e) {}
</script>
<p></p>
<br>
<script type="text/javascript">print_menu("search", 2, "search tool");</script>
<script type="text/javascript">
document.write('Access the search tool either direclty with the search form (if available on the web page) or via the popup search box invoked with the ' + shortcutSquareSearchPopup + ' shortcut square (assuming ' + colorAtTheBottom + ' on bottom) and/or the \'s\' shortcut key. The ' + shortcutSquareSearchRepeat + ' shortcut square (assuming ' + colorAtTheBottom + ' on bottom) and/or the \'enter\' shortcut key repeat the last search. The ' + shortcutSquareSearchRepeatBackward + ' shortcut square (assuming ' + colorAtTheBottom + ' on bottom) and/or the \'shift-enter\' shortcut key repeat the last search backward.');
</script>
<p></p>
For full details about the search tool (implemented as regular expression match of the text of the PGN game), please refer to <a href="http://code.google.com/p/pgn4web/wiki/SearchTool" target="_blank">the pgn4web search tool wiki page</a>; please find below a sample list of useful search patterns:
<p></p>
<script type="text/javascript">
document.write("<table style='padding:0;' border=0>");
print_help_row("something", "search for text <i>something</i> anywhere in the PGN game");
print_help_row("White\\s*\"Somebody", "search for player <i>Somebody</i> as White");
print_help_row("\(White|Black\)\\s*\"Somebody", "search for player <i>Somebody</i> as either White or Black");
print_help_row("White\\s*\"Somebody.*Black\\s*\"Other", "search for <i>Somebody</i> vs <i>Other</i> games");
print_help_row("Site\\s*\"Somewhere.*Result\\s*\"\(1-0|0-1\)", "search for games at the <i>Somewhere</i> site ending with a win");
print_help_row("Result\\s*\"\(?!1-0\)", "search for games not ending with a White win");
print_help_row("[^0-9]1.\\s*e4\\s*e6", "search for games with moves <i>1. e4 e6</i>");
print_help_row("[^0-9]1.\\s*e4\\s*e5\(?!\\s*2.\\s*Nf3\)", "search for games with moves <i>1. e4 e5</i> without <i>2. Nf3</i>");
document.write("</table>");
</script>
<p></p>
<br>
<script type="text/javascript">print_menu("credits", 2, "credits & license");</script>
Javascript modifications of <a href=mailto:[email protected] target=_blank>Paolo Casaschi ([email protected])</a> on code from the http://ficsgames.com database, in turn likely based on code from the LT PGN viewer at http://www.lutanho.net/pgn/pgnviewer.html
<p></p>
PNG images from http://ixian.com/chess/jin-piece-sets (<a href=http://creativecommons.org/licenses/by-sa/3.0/>creative commons attribution-share alike 3.0 unported license</a>).
<p></p>
The figurine fonts are derived from the Liberation Sans font (released under GNU General Public License, see https://fedorahosted.org/liberation-fonts/) with the addition of chess pieces from freeware fonts: the alpha2 font (Peter Strickland), the good companion font (David L. Brown), the merida font (Armando H. Marroquin), the pirate font (Klaus Wolf) and the chess usual font (Armando H. Marroquin). The original chess fonts and more details are available at http://www.enpassant.dk/chess/fonteng.htm
<p></p>
Remaining pgn4web code is copyright (C) 2009, 2010 <a href=mailto:[email protected] target=_blank>Paolo Casaschi ([email protected])</a> and licensed under the terms of the <a href=license-gpl-2.0.txt>GNU General Public License version 2</a> as published by the <a href=http://www.fsf.org target=_blank>Free Software Foundation</a>; either <a href=license-gpl-2.0.txt>version 2 of the License</a>, or (at your option) any later version.
<p></p>
<table width=100% cellspacing=0 cellpadding=0><tr>
<td align=left valign=bottom>
<script type="text/javascript">document.write("<b>pgn4web " + displayVersion + "</b>");</script>
</td><td align=right valign=bottom>
<img src=pawns.png border=0>
</td></tr></table>
</body>
</html>