Navigation Menu

Skip to content

Commit

Permalink
Fix CRLF
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Dec 6, 2010
1 parent d8fb31d commit fb68c65
Showing 1 changed file with 147 additions and 147 deletions.
294 changes: 147 additions & 147 deletions tactics.html
@@ -1,147 +1,147 @@
<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>Solve chess tactics!</title>

<link href="tactics.css" type="text/css" rel="stylesheet" />

<style type="text/css">

.newButton {
font-size: 9;
width: 80px;
vertical-align: middle;
text-align: center;
background-color: #f2d798;
border-color: #c9ad6f;
border-style: double;
border-width: 3;
}

</style>

<link rel="shortcut icon" href="pawn.ico" />

<script src="pgn4web.js" type="text/javascript"></script>
<script type="text/javascript">
SetPgnUrl("tactics.pgn"); // if set, this has precedence over the inline PGN in the HTML file
SetImagePath("uscf/24"); // use "" path if images are in the same folder as this javascript file
// SetImageType("png");
// SetHighlightOption(true); // true or false
// SetGameSelectorOptions(" ...", false, 0, 0, 0, 15, 15, 0, 10); // (head, num, chEvent, chSite, chRound, chWhite, chBlack, chResult, chDate);
// SetCommentsIntoMoveText(true);
// 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("random"); // 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
// SetInitialHalfmove(0,false); // 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(false);

cols2clear="ABCDEFGH";
rows2clear="1234567";
for (c=0; c<cols2clear.length; c++) {
for (r=0; r<rows2clear.length; r++) {
boardShortcut(cols2clear.charAt(c)+rows2clear.charAt(r), "", function(){});
}
}


function gup( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
regexS = regexS+"(?!.*"+regexS+")"; // matches the LAST occurrence
var regex = new RegExp( regexS, "i" );
var results = regex.exec( window.location.href );
if( results === null ) { return ""; }
else { return decodeURIComponent(results[1]); }
}

if ((assignedInitialGame = gup('n')) !== '') { SetInitialGame(assignedInitialGame); }

</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() -->

<center>
<table width=508 cellspacing=0 cellpadding=0 border=0>

<tr>
<td width=246 rowspan=3 valign=top>
<div id="GameBoard"></div>
</td>

<td width=16 rowspan=3>
</td>

<td width=246 height=40 valign=top>

<table width=246 cellspacing=0 cellpadding=0 border=0>
<tr>
<td width=50%>
<div style="text-align: left; font-size: 14;">#<span id="GameRound"></span></div>
</td>
<td width=50%>
<div style="text-align: right;">&nbsp;<span id="task" style="font-size: 14; background: yellow;">&nbsp;<span id="GameSideToMove"></span>&nbsp;to&nbsp;move&nbsp;</span></div>
</td>
</tr>
</table>

</td>

<tr>
<td width=246 height=166 valign=middle>
<span id="solution" style="font-size: 14; text-align: left; visibility: hidden">
<span id="GameText"></span> <span id="GameResult"></span>
</span>

</td>
</tr>

<tr>
<td width=246 height=40 valign=bottom>

<form style="display: inline">
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td width=80px valign=top>
<input type=button value="move back" title="click here to move back one ply when looking at the solution" class="newButton" onClick="javascript: MoveBackward(1); if (StartPly == CurrentPly) {document.getElementById('task').style.visibility = 'visible';}" onFocus="this.blur()">
</td>
<td width=4px>
</td>
<td width=80px valign=top>
<input type=button value="show solution" title="click here to show the solution and step through the main line" class="newButton" onClick="javascript:MoveForward(1); document.getElementById('solution').style.visibility = 'visible';document.getElementById('task').style.visibility = 'hidden';" onFocus="this.blur()">
</td>
<td width=4px>
</td>
<td width=80px valign=top>
<input type=button value="next puzzle" title="click here to load the next puzzle" class="newButton" onClick="javascript: document.getElementById('solution').style.visibility = 'hidden'; document.getElementById('task').style.visibility = 'visible'; Init(Math.floor(Math.random()*numberOfGames));" onFocus="this.blur()">
</td>
</tr>
</table>
</form>

</td>
</tr>

</table>
</center>

</body>
</html>
<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>Solve chess tactics!</title>

<link href="tactics.css" type="text/css" rel="stylesheet" />

<style type="text/css">

.newButton {
font-size: 9;
width: 80px;
vertical-align: middle;
text-align: center;
background-color: #f2d798;
border-color: #c9ad6f;
border-style: double;
border-width: 3;
}

</style>

<link rel="shortcut icon" href="pawn.ico" />

<script src="pgn4web.js" type="text/javascript"></script>
<script type="text/javascript">
SetPgnUrl("tactics.pgn"); // if set, this has precedence over the inline PGN in the HTML file
SetImagePath("uscf/24"); // use "" path if images are in the same folder as this javascript file
// SetImageType("png");
// SetHighlightOption(true); // true or false
// SetGameSelectorOptions(" ...", false, 0, 0, 0, 15, 15, 0, 10); // (head, num, chEvent, chSite, chRound, chWhite, chBlack, chResult, chDate);
// SetCommentsIntoMoveText(true);
// 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("random"); // 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
// SetInitialHalfmove(0,false); // 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(false);

cols2clear="ABCDEFGH";
rows2clear="1234567";
for (c=0; c<cols2clear.length; c++) {
for (r=0; r<rows2clear.length; r++) {
boardShortcut(cols2clear.charAt(c)+rows2clear.charAt(r), "", function(){});
}
}


function gup( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
regexS = regexS+"(?!.*"+regexS+")"; // matches the LAST occurrence
var regex = new RegExp( regexS, "i" );
var results = regex.exec( window.location.href );
if( results === null ) { return ""; }
else { return decodeURIComponent(results[1]); }
}

if ((assignedInitialGame = gup('n')) !== '') { SetInitialGame(assignedInitialGame); }

</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() -->

<center>
<table width=508 cellspacing=0 cellpadding=0 border=0>

<tr>
<td width=246 rowspan=3 valign=top>
<div id="GameBoard"></div>
</td>

<td width=16 rowspan=3>
</td>

<td width=246 height=40 valign=top>

<table width=246 cellspacing=0 cellpadding=0 border=0>
<tr>
<td width=50%>
<div style="text-align: left; font-size: 14;">#<span id="GameRound"></span></div>
</td>
<td width=50%>
<div style="text-align: right;">&nbsp;<span id="task" style="font-size: 14; background: yellow;">&nbsp;<span id="GameSideToMove"></span>&nbsp;to&nbsp;move&nbsp;</span></div>
</td>
</tr>
</table>

</td>

<tr>
<td width=246 height=166 valign=middle>
<span id="solution" style="font-size: 14; text-align: left; visibility: hidden">
<span id="GameText"></span> <span id="GameResult"></span>
</span>

</td>
</tr>

<tr>
<td width=246 height=40 valign=bottom>

<form style="display: inline">
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td width=80px valign=top>
<input type=button value="move back" title="click here to move back one ply when looking at the solution" class="newButton" onClick="javascript: MoveBackward(1); if (StartPly == CurrentPly) {document.getElementById('task').style.visibility = 'visible';}" onFocus="this.blur()">
</td>
<td width=4px>
</td>
<td width=80px valign=top>
<input type=button value="show solution" title="click here to show the solution and step through the main line" class="newButton" onClick="javascript:MoveForward(1); document.getElementById('solution').style.visibility = 'visible';document.getElementById('task').style.visibility = 'hidden';" onFocus="this.blur()">
</td>
<td width=4px>
</td>
<td width=80px valign=top>
<input type=button value="next puzzle" title="click here to load the next puzzle" class="newButton" onClick="javascript: document.getElementById('solution').style.visibility = 'hidden'; document.getElementById('task').style.visibility = 'visible'; Init(Math.floor(Math.random()*numberOfGames));" onFocus="this.blur()">
</td>
</tr>
</table>
</form>

</td>
</tr>

</table>
</center>

</body>
</html>

0 comments on commit fb68c65

Please sign in to comment.