()
| 517 | document.write(createGameLayer()); |
| 518 | |
| 519 | function initSetting() { |
| 520 | $("#username").val(cookie("username") ? cookie("username") : ""); |
| 521 | $("#message").val(cookie("message") ? cookie("message") : ""); |
| 522 | if (cookie("title")) { |
| 523 | $('title').text(cookie('title')); |
| 524 | $('#title').val(cookie('title')); |
| 525 | } |
| 526 | let keyboard = cookie('keyboard'); |
| 527 | if (keyboard) { |
| 528 | keyboard = keyboard.toString().toLowerCase(); |
| 529 | $("#keyboard").val(keyboard); |
| 530 | map = {} |
| 531 | map[keyboard.charAt(0)] = 1; |
| 532 | map[keyboard.charAt(1)] = 2; |
| 533 | map[keyboard.charAt(2)] = 3; |
| 534 | map[keyboard.charAt(3)] = 4; |
| 535 | } |
| 536 | if (cookie('gameTime')) { |
| 537 | $('#gameTime').val(cookie('gameTime')); |
| 538 | _gameSettingNum = parseInt(cookie('gameTime')); |
| 539 | gameRestart(); |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | w.show_btn = function() { |
| 544 | $("#btn_group,#desc").css('display', 'block') |
no test coverage detected