update readme
This commit is contained in:
parent
3775da301f
commit
8989a58f1f
|
@ -1 +1,6 @@
|
||||||
|
## hgman
|
||||||
|
It's simple word guessing game
|
||||||
|
|
||||||
|
[[ChangeLog](CHANGELOG.md)]
|
||||||
|
|
||||||
|
![License](https://img.shields.io/github/license/iiiypuk/hgman?style=for-the-badge) ![Lines code](https://img.shields.io/tokei/lines/github/iiiypuk/hgman?style=for-the-badge)
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,3 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
const pageCredits = '\
|
const pageCredits = '\
|
||||||
<p class="text-center">Font F5.6 by\
|
<p class="text-center">Font F5.6 by\
|
||||||
<a href="http://dotcolon.net/">DOT COLON</a>\
|
<a href="http://dotcolon.net/">DOT COLON</a>\
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
const pageStatistics = '\
|
const pageStatistics = '\
|
||||||
<table>\
|
<table>\
|
||||||
<caption>User statistics</caption>\
|
<caption>User statistics</caption>\
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
function updateStats(statParameter) {
|
function updateStats(statParameter) {
|
||||||
let stTotalGames = JSON.parse(localStorage.getItem("stTotalGames"));
|
let stTotalGames = JSON.parse(localStorage.getItem("stTotalGames"));
|
||||||
let stWinWords = JSON.parse(localStorage.getItem("stWinWords"));
|
let stWinWords = JSON.parse(localStorage.getItem("stWinWords"));
|
||||||
|
|
|
@ -19,7 +19,7 @@ let lives = 6;
|
||||||
function generateKeyboard(layout) {
|
function generateKeyboard(layout) {
|
||||||
let keyboardHtmlStr = "";
|
let keyboardHtmlStr = "";
|
||||||
layout.split("").forEach(function(letter) {
|
layout.split("").forEach(function(letter) {
|
||||||
keyboardHtmlStr = keyboardHtmlStr + '<button class="button clear is-marginless" id="' + letter + '" onclick="letterClick(\'' + letter + "')\"> " + letter + "</button>";
|
keyboardHtmlStr += `<button class="button clear is-marginless" id="${letter}" onclick="letterClick('${letter}')">${letter}</button>`;
|
||||||
});
|
});
|
||||||
let keyboard = document.querySelector("#keyboard");
|
let keyboard = document.querySelector("#keyboard");
|
||||||
keyboard.classList.remove("is-hidden");
|
keyboard.classList.remove("is-hidden");
|
||||||
|
@ -71,7 +71,6 @@ function wrongLetter() {
|
||||||
|
|
||||||
// display tab content
|
// display tab content
|
||||||
function showPage(element, pageName) {
|
function showPage(element, pageName) {
|
||||||
// alert(event.srcElement.id);
|
|
||||||
[ "gameButton", "statsButton", "creditsButton" ].forEach(function(item) {
|
[ "gameButton", "statsButton", "creditsButton" ].forEach(function(item) {
|
||||||
document.querySelector("#" + item).classList.remove("active");
|
document.querySelector("#" + item).classList.remove("active");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue