]> git.sesse.net Git - remoteglot-book/blobdiff - www/js/book.js
Show immediate end results as moves.
[remoteglot-book] / www / js / book.js
index 8785a3454cbb385079b99ee7b0577ee2c50c5d3a..5ee769335390fe04463ce1756b5386c161232910 100644 (file)
@@ -250,10 +250,14 @@ var show_lines = function(data, game) {
                                        }
                                }
 
-                               var move_a = document.createElement("a");
-                               move_a.href = "javascript:make_move('" + line[j] + "')";
-                               td.appendChild(move_a);
-                               $(move_a).text(line[j]);
+                               if (line[j] === '1-0' || line[j] === '1/2-1/2' || line[j] === '0-1') {
+                                       $(td).text($(td).text() + line[j]);
+                               } else {
+                                       var move_a = document.createElement("a");
+                                       move_a.href = "javascript:make_move('" + line[j] + "')";
+                                       td.appendChild(move_a);
+                                       $(move_a).text(line[j]);
+                               }
                        } else if (headings[j][1] == TYPE_INTEGER) {
                                add_td(tr, line[j] || 0);
                        } else if (headings[j][1] == TYPE_FLOAT) {