}
function highlightTile(e) {
- let id = this.id;
+ const id = this.id;
if (id === "") {
return;
}
const row = letters[Math.floor(id / 15)];
sendCmds([{
cmd: "msg",
- msg: _("Look at:") + " " + row + "" + col,
+ msg: _("Look at:") + " " + String(row) + String(col),
specialMsg: {
type: "highlightTile",
tile: id
function localHighlightTile(id) {
const placeholder = boardCells[id].getElementsByClassName("tile-placeholder")[0];
placeholder.classList.add("highlight");
- setTimeout(function (x) { x.classList.remove("highlight"); }, 500, placeholder);
- setTimeout(function (x) { x.classList.add("highlight"); }, 750, placeholder);
- setTimeout(function (x) { x.classList.remove("highlight"); }, 1000, placeholder);
- setTimeout(function (x) { x.classList.add("highlight"); }, 1250, placeholder);
- setTimeout(function (x) { x.classList.remove("highlight"); }, 1500, placeholder);
+ setTimeout(
+ function (x) {
+ x.classList.remove("highlight");
+ }, 500, placeholder);
+ setTimeout(
+ function (x) {
+ x.classList.add("highlight");
+ }, 750, placeholder);
+ setTimeout(
+ function (x) {
+ x.classList.remove("highlight");
+ }, 1000, placeholder);
+ setTimeout(
+ function (x) {
+ x.classList.add("highlight");
+ }, 1250, placeholder);
+ setTimeout(
+ function (x) {
+ x.classList.remove("highlight");
+ }, 1500, placeholder);
}
function initChat() {
cell = document.createElement("td");
boardCells.push(cell);
board.lastChild.appendChild(cell);
- cell.id = i * 15 + j;
+ cell.id = (i * 15) + j;
cell.ondblclick = highlightTile;
cell.ontouchstart = highlightTile;
cell.appendChild(document.createElement("div"));