Lines Matching +full:style +full:. +full:local +full:. +full:ini

6  *  see README file and http://pgn4web.casaschi.net
26 $fileUploadLimitText = round(($fileUploadLimitBytes / 1048576), 0) . "MB";
30 … server error message when trying to load a remote URL while allow_fopen_url is disabled in php.ini
33 if (!$zipSupported) { $pgnDebugInfo = $pgnDebugInfo . "\\n" . "ZIP support unavailable from server,…
47 $startPosition = '[Event ""] [Site ""] [Date ""] [Round ""] [White ""] [Black ""] [Result ""] ' . (…
56 // modify the viewer-preset-URLs.php file to add preset URLs for the viewer's form
57 include 'viewer-preset-URLs.php';
66 header("content-disposition: inline; filename=games.pgn");
75 $pgnLink = $_SERVER['SCRIPT_NAME'] . urlencode("?po=t&pd=" . $pgnUrl);
76 …print("<div style='font-family:sans-serif; padding:1em;'><a style='text-decoration:none; color:bla…
113 if (preg_match('/([^:]+): (.+)/m', $field, $match)) {
114 …$match[1] = preg_replace('/(?<=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(trim($match[1…
126 …if (isset($retVal["Last-Modified"])) { $http_response_header_last_modified = "Last-Modified: " . $…
144 $pgnDebugInfo = $pgnDebugInfo . get_param("debug", "d", "");
167 $isPgn = preg_match("/\.(pgn|txt)$/i", preg_replace("/[?#].*$/", "", $pgnUrl));
168 $isZip = preg_match("/\.zip$/i", preg_replace("/[?#].*$/", "", $pgnUrl));
192 …$pgnStatus = "error: failed to get $pgnUrl: " . (http_response_header_isInvalid() ? "server error:…
215 $isPgn = preg_match("/\.(pgn|txt)$/i",$pgnFileName);
216 $isZip = preg_match("/\.zip$/i",$pgnFileName);
224 …$pgnStatus = $pgnStatus . "file size exceeds $fileUploadLimitText form limit or $fileUploadLimitIn…
228 $pgnStatus = $pgnStatus . "file missing or truncated";
233 $pgnStatus = $pgnStatus . "server error";
236 $pgnStatus = $pgnStatus . "unknown upload error";
250 if (preg_match("/\.pgn$/i",zip_entry_name($zipEntry))) {
251 … $pgnText = $pgnText . zip_entry_read($zipEntry, zip_entry_filesize($zipEntry)) . "\n\n\n";
282 …$pgnStatus = "error: failed reading $pgnFileString: " . (http_response_header_isInvalid() ? "serve…
321 if (preg_match("/^[a-zA-Z]+:\/\/.+/", $tmpDir)) { return; }
326 if (($entryName !== ".") && ($entryName !== "..") && ($entryName !== "index.html")) {
327 if ((time() - filemtime($tmpDir . "/" . $entryName)) > 3600) {
328 $unexpectedFiles = $unexpectedFiles . " " . $entryName;
334 …$pgnDebugInfo = $pgnDebugInfo . "\\n" . "clean temporary directory " . $tmpDir . ":" . $unexpected…
337 $pgnDebugInfo = $pgnDebugInfo . "\\n" . "failed opening temporary directory " . $tmpDir;
346 <div style="height:0.2em; overflow:hidden;"><a name="$item">&nbsp;</a></div>
347 <div style="width:100%; text-align:right; font-size:66%; padding-bottom:0.5em;">
348 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#bottom" style="color: #B0B0B0;" onclick="this.blur();">bottom</a>
349 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#moves" style="color: #B0B0B0;" onclick="this.blur();">moves</a>
350 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#board" style="color: #B0B0B0;" onclick="this.blur();">board</a>
351 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#top" style="color: #B0B0B0;" onclick="this.blur();">top</a>
376 <link rel="icon" sizes="16x16" href="pawn.ico" />
379 <style type="text/css">
408 .formControl {
413 .verticalMiddle {
418 .borderBox {
424 .textboxAppearance {
430 .headClass {
434 </style>
440 <h1 class="headClass" style="margin-top:0px; padding-top:0px; text-align:right;">
441 <a style="float:left; color:red;">
444 <a href="." onfocus="this.blur();" style="width:49px; height:29px; background:url(pawns.png) -47px …
447 <div style="height:1em;" class="headClass">&nbsp;</div>
460 if (($headlessPage == "true") || ($headlessPage == "t")) { $thisScript .= "?hp=t"; }
469 document.getElementById("urlFormText").value = newPgnUrl;
474 var theObj = document.getElementById("urlFormText");
476 if (!checkPgnExtension(theObj.value)) { return false; }
477 else { return (theObj.value !== ""); }
481 var theObj = document.getElementById("uploadFormFile");
483 if (!checkPgnExtension(theObj.value)) { return false; }
484 else { return (theObj.value !== ""); }
492 if (uri.replace(/[?#].*$/, "").match(/\\.(zip|pgn|txt)\$/i)) {
505 if (uri.match(/\\.(pgn|txt)\$/i)) {
507 } else if (uri.match(/\\.zip\$/i)) {
522 …document.getElementById("pgnFormButton").title = "view games from textbox: PGN textbox size is " +…
523 if (document.getElementById("pgnFormText").value.length == 1) {
524 document.getElementById("pgnFormButton").title += " char;";
526 document.getElementById("pgnFormButton").title += " chars;";
528 document.getElementById("pgnFormButton").title += " $debugHelpText";
529 document.getElementById("pgnFormText").title = document.getElementById("pgnFormButton").title;
535 var theObjPgnFormText = document.getElementById('pgnFormText');
537 if (theObjPgnFormText.value === "") { return; }
539 var theObjPgnText = document.getElementById('pgnText');
542 theObjPgnText.value = theObjPgnFormText.value;
544 theObjPgnText.value = theObjPgnText.value.replace(/\\[/g,'\\n\\n[');
545 theObjPgnText.value = theObjPgnText.value.replace(/\\]/g,']\\n\\n');
546 theObjPgnText.value = theObjPgnText.value.replace(/([012\\*])(\\s*)(\\[)/g,'\$1\\n\\n\$3');
547 theObjPgnText.value = theObjPgnText.value.replace(/\\]\\s*\\[/g,']\\n[');
548 theObjPgnText.value = theObjPgnText.value.replace(/^\\s*\\[/g,'[');
549 theObjPgnText.value = theObjPgnText.value.replace(/\\n[\\s*\\n]+/g,'\\n\\n');
551 document.getElementById('uploadFormFile').value = "";
552 document.getElementById('urlFormText').value = "";
565 var theObj = document.getElementById("urlFormSelect");
569 switch (theObj.value) {
574. ' case "' . $value['label'] . '":' . "\n" . ' targetPgnUrl = (function(){ ' . $value…
584 theObj.value = "header";
590 if ((theObj = document.getElementById("pgnFormText")) && (theObj.offsetHeight)) {
591 return (theObj.offsetHeight + "px");
599 document.getElementById("uploadFormFile").value = "";
600 document.getElementById("urlFormText").value = "";
601 document.getElementById("pgnFormText").value = "";
602 document.getElementById("pgnFormText").style.height = textFormMinHeight;
604 document.getElementById("pgnText").value = '$startPosition';
619 // fake functions to avoid warnings before pgn4web.js is loaded
625 <table style="margin-bottom:1.5em; $hideFormCss" width="100%" cellspacing="0" cellpadding="3" borde…
627 …<form id="uploadForm" action="$thisScript" enctype="multipart/form-data" method="POST" style="disp…
630local file " style="width:100%;" title="view games from local file: PGN and ZIP files must be smal…
634style="width:100%;" title="view games from local file: PGN and ZIP files must be smaller than $fil…
640 <form id="urlForm" action="$thisScript" method="POST" style="display:inline;">
643 …t) and $fileUploadLimitIniText (server limit); $debugHelpText" onClick="this.blur(); return checkP…
646 …pgnUrl" type="text" class="formControl verticalMiddle borderBox" value="" style="width:100%;" onFo…
652. "\n" . ' <select id="urlFormSelect" class="formControl verticalMiddle" style="font-family:m…
654 … print(' <option value="' . $value['label'] . '">' . $value['label'] . '</option>' . "\n");
656 …(' <option value="clear">clear URL</option>' . "\n" . ' </select>' . "\n" . ' </td>…
663 <form id="textForm" style="display:inline;">
666 …ton" class="formControl" value=" view games from textbox " style="width:100%;" onClick="this.blur(…
669 …trol verticalMiddle borderBox textboxAppearance" name="pgnTextbox" rows=4 style="width:100%; resiz…
676 …tton" type="button" class="formControl" value=" reset viewer " onClick="this.blur(); if (confirm('…
686 var theObj = document.getElementById("pgnFormText");
688 theObj.style.height = textFormMinHeight;
689 theObj.style.minHeight = textFormMinHeight;
705 <style type="text/css">
707 @import url("fonts/pgn4web-font-LiberationSans.css");
708 @import url("fonts/pgn4web-font-ChessSansUsual.css");
710 .gameBoard, .boardTable {
715 .boardTable {
716 border-style: solid;
722 .pieceImage {
727 .whiteSquare,
728 .blackSquare,
729 .highlightWhiteSquare,
730 .highlightBlackSquare {
733 border-style: solid;
737 .whiteSquare,
738 .highlightWhiteSquare {
743 .blackSquare,
744 .highlightBlackSquare {
749 .highlightWhiteSquare,
750 .highlightBlackSquare {
754 .selectControl {
760 .optionSelectControl {
763 .gameButtons {
767 .buttonControlPlay,
768 .buttonControlStop,
769 .buttonControl {
783 .buttonControlSpace {
788 .searchPgnButton {
793 .searchPgnExpression {
798 .move,
799 .variation,
800 .comment {
805 .move,
806 .variation,
807 .commentMove {
811 a.move,
812 a.variation,
813 .commentMove {
817 .move,
818 .variation {
822 .move {
826 .moveText {
831 .comment,
832 .variation {
836 a.variation {
840 .moveOn,
841 .variationOn {
845 .selectSearchContainer {
849 .emMeasure {
854 .mainContainer {
859 .columnsContainer {
864 .boardColumn {
869 .headerColumn {
873 .headerItem {
880 .innerHeaderItem,
881 .innerHeaderItemNoMargin {
886 .innerHeaderItem {
890 .innerHeaderItemNoMargin {
894 .headerSpacer {
898 .gameAnnotationContainer {
903 .toggleComments, .toggleAnalysis {
908 .toggleCommentsLink, .toggleAnalysisLink, .backButton {
917 .gameAnnotationMessage {
925 .lastMoveAndVariations {
929 .lastMove {
932 .lastVariations {
936 .nextMoveAndVariations {
940 .nextMove {
943 .nextVariations {
947 .backButton {
950 .lastMoveAndComment {
956 .lastComment {
968 .analysisEval {
973 .analysisMove {
976 .tablebase {
980 .analysisPv {
984 </style>
986 <script src="pgn4web.js" type="text/javascript"></script>
987 <script src="engine.js" type="text/javascript"></script>
988 <script src="fonts/chess-informant-NAG-symbols.js" type="text/javascript"></script>
989 <script src="fide-lookup.js" type="text/javascript"></script>
991 <style type="text/css">
993 .NAGs {
998 </style>
1001 <form style="display: none;"><textarea style="display: none;" id="pgnText">
1034 try { ho = (localStorage.getItem("pgn4web_chess_viewer_highlightOption") != "false"); }
1039 try { localStorage.setItem("pgn4web_chess_viewer_highlightOption", ho ? "true" : "false"); }
1046 … try { cimt = !(localStorage.getItem("pgn4web_chess_viewer_commentsIntoMoveText") == "false"); }
1051 …try { localStorage.setItem("pgn4web_chess_viewer_commentsIntoMoveText", cimt ? "true" : "false"); }
1058 … try { cosl = (localStorage.getItem("pgn4web_chess_viewer_commentsOnSeparateLines") == "true"); }
1063 …try { localStorage.setItem("pgn4web_chess_viewer_commentsOnSeparateLines", cosl ? "true" : "false"…
1070 try { d = parseInt(localStorage.getItem("pgn4web_chess_viewer_Delay"), 10); }
1075 try { localStorage.setItem("pgn4web_chess_viewer_Delay", d); }
1081 … searchPgnGame('\\\\[\\\\s*' + tag + '\\\\s*"' + fixRegExp(key) + '"\\\\s*\\\\]', event.shiftKey);
1084 …searchPgnGame('\\\\[\\\\s*' + tag + '\\\\s*"(?!' + fixRegExp(key) + '"\\\\s*\\\\])', event.shiftKe…
1090 var theObj = document.getElementById(elementId);
1092 … theObj.className = (theObj.innerHTML === "") ? "innerHeaderItemNoMargin" : "innerHeaderItem";
1093 for (var ii = 0; ii < headerId.length; ii++) {
1096 …theObj.title = simpleHtmlentitiesDecode((ii < headerId.length ? headerLabel[ii] : elementId) + ": …
1104 if (fixForDisplay && (theObj = document.getElementById(elementId)) && theObj.innerHTML) {
1105 theObj.innerHTML = fixCommentForDisplay(theObj.innerHTML);
1128 else if (theObj = document.getElementById("GameAnnotationMessage")) {
1129 if ((!annotateInProgress) && (theObj.innerHTML.indexOf("completed") > -1)) {
1130 theObj.style.display = "none";
1131 theObj.innerHTML = "";
1132 theObj.title = "";
1133 if (theObj = document.getElementById("GameButtons")) {
1134 theObj.style.display = "";
1150 if (theObj = document.getElementById("GameRound")) {
1151 if (theObj.innerHTML) {
1152 theObj.innerHTML = "round " + theObj.innerHTML;
1156 if (theObj = document.getElementById("GameBoardNum")) {
1157 if (theObj.innerHTML) {
1158 theObj.innerHTML = "board " + theObj.innerHTML;
1178 … else { if (theObj = document.getElementById('ResultAtGametextEnd')) { theObj.innerHTML = ""; } }
1180 if (theObj = document.getElementById("GameNumCurrent")) {
1181 theObj.innerHTML = currentGame + 1;
1182 theObj.title = "current game: " + (currentGame + 1);
1185 if (theObj = document.getElementById('lastMoveAndComment')) {
1194 theObj.style.display = lastDisplayStyle;
1196 if (theObj = document.getElementById("toggleCommentsLink")) {
1198 theObj.innerHTML = commentsIntoMoveText ? "&times;" : "+";
1200 theObj.innerHTML = "";
1206 PlyNumberMax = Math.max(PlyNumberMax, StartPlyVar[ii] + PlyNumberVar[ii] - StartPly);
1213 if (theObj = document.getElementById("toggleAnalysisLink")) {
1214 …theObj.style.visibility = (annotationSupported && engineUnderstandsGame(currentGame)) ? "visible" …
1216 if (theObj = document.getElementById("GameAnalysisEval")) {
1217 …theObj.style.visibility = (annotationSupported && engineUnderstandsGame(currentGame)) ? "visible" …
1226 … (gameLoadStatus) { myAlert(gameLoadStatus, gameLoadStatus.match(/^error:/), !gameLoadStatus.matc…
1227 if (theObj = document.getElementById("GameNumInfo")) {
1228 theObj.style.display = numberOfGames > 1 ? "block" : "none";
1230 if (theObj = document.getElementById("GameNumTotal")) {
1231 theObj.innerHTML = numberOfGames;
1232 theObj.title = "number of games: " + numberOfGames;
1238 if (event.shiftKey) {
1251 switch (location.hash) {
1262 if (hash) { location.hash = ""; }
1263 else { location.hash = "#board"; }
1264 location.hash = "#" + hash;
1269 // customShortcutKey_Shift_1 defined by fide-lookup.js
1270 // customShortcutKey_Shift_2 defined by fide-lookup.js
1281 // customShortcutKey_Shift_8 defined by engine.js
1282 // customShortcutKey_Shift_9 defined by engine.js
1283 // customShortcutKey_Shift_0 defined by engine.js
1287 …return ((typeof(gameVariant[gameNum]) == "undefined") || (gameVariant[gameNum].match(/^(chess|norm…
1291 function emPixels(em) { return em * document.getElementById("emMeasure").offsetHeight; }
1295 var theObj = document.getElementById("GameLastComment");
1299 if (theObj.scrollHeight === theObj.clientHeight) { cycleLastCommentArea(); }
1303 if (theObj.offsetHeight == emPixels(21)) { cycleLastCommentArea(); }
1307 if (theObj.offsetHeight == emPixels(4.2)) { cycleLastCommentArea(); }
1317 var theObj = document.getElementById("GameLastComment");
1318 if (theObj) { theObj.style.height = ""; }
1322 var theObj = document.getElementById("GameLastComment");
1324 theObj.style.height = "";
1325 theObj.style.height = theObj.scrollHeight + "px";
1330 var theObj = document.getElementById("GameLastComment");
1331 if (theObj) { theObj.style.height = "21em"; }
1347 <div id="GameSearch" style="white-space:nowrap;"></div>
1349style="width:15ex; margin-right:0.5ex; display:none; color: #808080; font-size: 66%;"><span id="Ga…
1352 …mMeasure" class="emMeasure"><a href="#zoom" onclick="this.blur();" id="zoom" class="NAGs" style="w…
1364 …cript:void(0);" onclick="stopAnnotateGame(false); this.blur();" class="gameAnnotationMessage" styl…
1369 …f="javascript:void(0);" onclick="searchTagDifferent('Date', this.innerHTML, event); this.blur();">…
1370 …f="javascript:void(0);" onclick="searchTagDifferent('Site', this.innerHTML, event); this.blur();">…
1372.innerHTML, event); this.blur();"></a><a class="innerHeaderItem" id="GameSection" href="javascript…
1373.innerHTML.replace('round ', ''), event); this.blur();"></a><a class="innerHeaderItem" id="GameBoa…
1375.innerHTML, event); this.blur();"></a><a class="innerHeaderItem" id="GameOpening" href="javascript…
1378.innerHTML, customPgnHeaderTag('WhiteFideId'), event); this.blur();" class="innerHeaderItem" id="G…
1379.innerHTML, customPgnHeaderTag('BlackFideId'), event); this.blur();" class="innerHeaderItem" id="G…
1382.shiftKey ? initialHalfmove_default : (initialHalfmove == 'end' ? 'start' : 'end'), true); GoToMov…
1386.shiftKey) { clickedGameAnalysisEval(); } else { userToggleAnalysis(); } this.blur(); return false…
1389 …tationGraph" height="1" width="1" onclick="annotationGraphClick(event); this.blur();" onmousemove=…
1392style="visibility:hidden;" id="toggleAnalysisLink" href="javascript:void(0);" onclick="if (event.s…
1393.shiftKey && commentsIntoMoveText) { cycleLastCommentArea(); } else { SetCommentsIntoMoveText(!com…
1405 …ass="backButton" href="javascript:void(0);" onclick="backButton(event); this.blur();" title="move …
1423 <div id="moveText" class="moveText"><span id="GameText"></span> <span class="move" style="white-spa…
1443 var menPosition = CurrentFEN().replace(/\s.*$/, "").replace(/[0-9\/]/g, "").length;
1450 theObj = document.getElementById("GameTablebase");
1451 if (theObj) { theObj.innerHTML = translateNAGs("$148"); }
1455 var menPosition = thisFen.replace(/\s.*$/, "").replace(/[0-9\/]/g, "").length;
1456 var theObj = document.getElementById("GameTablebase");
1458 …theObj.style.display = (menPosition >= minMenInTablebase) && (menPosition <= maxMenInTablebase) &&…
1462 var annotationSupported = !!window.Worker;
1464 document.getElementById("GameAnnotationGraph").getContext("2d");
1475 if (theObj = document.getElementById("toggleAnalysisLink")) { theObj.innerHTML = "&times;"; }
1484 var theObj = document.getElementById("toggleAnalysisLink");
1485 if (theObj) { theObj.innerHTML = "+"; }
1509 else if (theObj = document.getElementById("GameAnnotationGraph")) {
1512 theObj.width = canvasWidth;
1514 theObj.height = canvasHeight;
1517 …annotationBarWidth = canvasWidth / (Math.max(Math.ceil(PlyNumberMax / annotationPlyBlock) * annota…
1518 var barOverlap = Math.ceil(annotationBarWidth / 20);
1519 var lineHeight = Math.ceil(canvasHeight / 100);
1520 var lineTop = Math.floor((canvasHeight - lineHeight) / 2);
1524 var context = theObj.getContext("2d");
1525 context.beginPath();
1529 …context.rect(thisBarTopLeftX, thisBarTopLeftY, (PlyNumber + 1) * annotationBarWidth + barOverlap, …
1530 context.fillStyle = "#D9D9D9";
1531 context.fill();
1532 context.fillStyle = "#666666";
1541 … thisBarHeight = Math.max((1 - Math.pow(2, -annGraphEval)) * maxBarHeight, lineHeight);
1544 … thisBarHeight = Math.max((1 - Math.pow(2, annGraphEval)) * maxBarHeight, lineHeight);
1548 context.beginPath();
1549 … context.rect(thisBarTopLeftX, thisBarTopLeftY, annotationBarWidth + barOverlap, thisBarHeight);
1550 context.fill();
1559 context.beginPath();
1560 …context.rect(highlightTopLeftX, highlightTopLeftY, annotationBarWidth + barOverlap, highlightBarHe…
1561 context.fillStyle = "#FF6633";
1562 context.fill();
1569 var theObj = document.getElementById("GameAnnotationGraph");
1571 var context = theObj.getContext("2d");
1572 theObj.width = graphCanvasWidth();
1573 theObj.height = graphCanvasHeight();
1574 context.clearRect(0, 0, theObj.width, theObj.height);
1579 var theObj = document.getElementById("GameAnnotationContainer");
1580 if (theObj) { return theObj.offsetWidth; }
1584 var theObj = document.getElementById("GameAnnotationContainer");
1585 if (theObj) { return theObj.offsetHeight; }
1595 if (theObj = document.getElementById("GameAnalysisMove")) {
1597 …annMove = (Math.floor(annPly / 2) + (annPly % 2)) + (annPly % 2 ? ". " : "... ") + Moves[annPly - …
1602 theObj.innerHTML = annMove;
1609 if (theObj = document.getElementById("GameAnalysisEval")) {
1610 theObj.innerHTML = (annEval || annEval === 0) ? ev2NAG(annEval) : "";
1611 …theObj.title = (annEval || annEval === 0) ? "engine evaluation: " + (annEval > 0 ? "+" : "") + ann…
1613 if (theObj = document.getElementById("GameAnalysisPv")) {
1614 theObj.innerHTML = annPv ? annPv : "";
1615 theObj.title = annPv ? "engine principal variation: " + annPv : "";
1629 if (!useNAGeval) { return (ev > 0 ? "+" : "") + ev + (ev == Math.floor(ev) ? ".0" : ""); }
1641 if (theObj = document.getElementById("GameAnalysisMove")) { theObj.innerHTML = ""; }
1642 …if (theObj = document.getElementById("GameAnalysisEval")) { theObj.innerHTML = "&middot;&nbsp;"; t…
1643 if (theObj = document.getElementById("GameTablebase")) { theObj.style.display = "none"; }
1644 if (theObj = document.getElementById("GameAnalysisPv")) { theObj.innerHTML = ""; }
1661 …var newMousemoveAnnPly = StartPly + Math.floor((e.pageX - document.getElementById("GameAnnotationG…
1671 …var annPly = StartPly + Math.floor((e.pageX - document.getElementById("GameAnnotationGraph").offse…
1673 if (e.shiftKey) { save_cache_to_localStorage(); }
1681 if (num >= Math.pow(10, 12)) { num = Math.round(num / Math.pow(10, 11)) / 10; unit = "T"; }
1682 … else if (num >= Math.pow(10, 9)) { num = Math.round(num / Math.pow(10, 8)) / 10; unit = "G"; }
1683 else if (num >= Math.pow(10, 6)) { num = Math.round(num / Math.pow(10, 5)) / 10; unit = "M"; }
1684 else if (num >= Math.pow(10, 3)) { num = Math.round(num / Math.pow(10, 2)) / 10; unit = "K"; }
1685 if ((unit !== "") && (num === Math.floor(num))) { num += ".0"; }
1691 var minAnnotationSeconds = Math.max(1, Math.floor(minAutoplayDelay/1000));
1692 var maxAnnotationSeconds = Math.max(100, Math.floor(maxAutoplayDelay/1000));
1698 try { as = parseFloat(localStorage.getItem("pgn4web_chess_viewer_annotationSeconds")); }
1703 try { localStorage.setItem("pgn4web_chess_viewer_annotationSeconds", as); }
1710 …lease do not interact with the chessboard until the annotation has completed.\\n\\nEnter annotatio…
1712 …annotationSeconds = Math.min(maxAnnotationSeconds, Math.max(minAnnotationSeconds, annotationSecond…
1723 var theObj = document.getElementById("GameAnnotationMessage");
1725 … theObj.innerHTML = "automated game" + (annotateGameMulti ? "s" : "") + " annotation in progress";
1726 …theObj.title = theObj.innerHTML + " at " + annotationSeconds + " second" + (annotationSeconds == 1…
1727 theObj.style.display = "";
1728 if (theObj = document.getElementById("GameButtons")) {
1729 theObj.style.display = "none";
1756 var theObj = document.getElementById("GameAnnotationMessage");
1758 theObj.style.display = ((annotateInProgress) && (annotationCompleted)) ? "" : "none";
1759 …theObj.innerHTML = ((annotateInProgress) && (annotationCompleted)) ? "automated game" + (annotateG…
1760 theObj.title = "";
1761 if (theObj = document.getElementById("GameButtons")) {
1762 theObj.style.display = ((annotateInProgress) && (annotationCompleted)) ? "none" : "";
1818 …forward = ((typeof(event) != "undefined") && (typeof(event.shiftKey) != "undefined")) ? !event.shi…
1863 …t last move and current comment text area, if present", function(t,e){ if (e.shiftKey) { resetLast…
1866 … blunder", function(t,e){ if (annotationSupportedCheckAndWarnUser()) { if (e.shiftKey) { GoToMove(…
1868 … mistake", function(t,e){ if (annotationSupportedCheckAndWarnUser()) { if (e.shiftKey) { GoToMove(…
1870 … mistake", function(t,e){ if (annotationSupportedCheckAndWarnUser()) { if (e.shiftKey) { GoToMove(…
1872 … blunder", function(t,e){ if (annotationSupportedCheckAndWarnUser()) { if (e.shiftKey) { GoToMove(…
1875 …ion(t,e){ if (annotationSupportedCheckAndWarnUser()) { annotateGameMulti = e.shiftKey; if (annotat…
1877 …notation", function(t,e){ if (annotationSupportedCheckAndWarnUser()) { if (e.shiftKey) { if (confi…
1882 var engineWorker = "libs/garbochess/garbochess.js";
1899 g_backgroundEngine.addEventListener("message", function (e) {
1900 if ((e.data.match("^pv")) && (fenString == CurrentFEN())) {
1901 …var matches = e.data.substr(3, e.data.length - 3).match(/Ply:(\d+) Score:(-*\d+) Nodes:(\d+) NPS:(…
1907 g_ev = Math.round(g_ev / 100) / 10;
1909 if (fenString.indexOf(" b ") !== -1) { g_ev = -g_ev; }
1913 g_topNodesPerSecond = Math.max(nodesPerSecond, g_topNodesPerSecond);
1914.replace(/(^\s+|\s*[x+=]|\s+$)/g, "").replace(/\s*stalemate/, "=").replace(/\s*checkmate/, "#"); /…
1927 } else if (e.data.match("^message Invalid FEN")) {
1931 … myAlert("error: engine: " + e.data.replace(/^message /, "") + "\\n" + fenString);
1962 cache_fen = cache_fen.split(",");
1965 cache_ev = cache_ev.split(",");
1966 if (typeof(cache_ev.map == "function")) { cache_ev = cache_ev.map(parseFloat); }
1969 cache_pv = cache_pv.split(",");
1972 cache_depth = cache_depth.split(",");
1973 if (typeof(cache_depth.map == "function")) { cache_depth = cache_depth.map(parseFloat); }
1976 …if ((cache_fen.length !== cache_ev.length) || (cache_fen.length !== cache_pv.length) || (cache_fen
1986 localStorage[cache_local_storage_prefix + "fen"] = cache_fen.toString();
1987 localStorage[cache_local_storage_prefix + "ev"] = cache_ev.toString();
1988 localStorage[cache_local_storage_prefix + "pv"] = cache_pv.toString();
1989 localStorage[cache_local_storage_prefix + "depth"] = cache_depth.toString();
1995 localStorage.removeItem(cache_local_storage_prefix + "pointer");
1996 localStorage.removeItem(cache_local_storage_prefix + "fen");
1997 localStorage.removeItem(cache_local_storage_prefix + "ev");
1998 localStorage.removeItem(cache_local_storage_prefix + "pv");
1999 localStorage.removeItem(cache_local_storage_prefix + "depth");
2000 localStorage.removeItem(cache_local_storage_prefix + "nodes"); // backward compatibility
2009.length + localStorage[cache_local_storage_prefix + "fen"].length + localStorage[cache_local_stora…
2018 var cache_max = 8000; // ~ 64 games of 60 moves ~ 1MB of local storage
2037 cache_fen[cache_pointer] = fenString.replace(/\s+\d+\s+\d+\s*$/, "");
2059 fenString = fenString.replace(/\s+\d+\s+\d+\s*$/, "");
2061 …if (typeof(cache_fen.lastIndexOf) == "function") { return (cache_last = cache_fen.lastIndexOf(fenS…
2062 for (var n = cache_fen.length - 1; n >= 0; n--) {
2080 g_backgroundEngine.terminate();
2096 g_backgroundEngine.postMessage("position " + fenString);
2097 g_backgroundEngine.postMessage("analyze");
2109 if ((pv !== "") && (pv.match(/^[#=]/))) { return true; }
2110 var matches = FEN.match(/\s*\S+\s+\S+\s+\S+\s+\S+\s+(\d+)\s+\S+\s*/);
2125 window.onunload = function() {
2147 if (($pgnDebugInfo) != "") { $pgnDebugMessage = "warning: system: " . $pgnDebugInfo; }
2159 if ("$pgnDebugMessage".length > 0) { myAlert("$pgnDebugMessage", false, true); }