X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/02d3c22d5c4670f1f939099b90147ba53008c1e0..3761a259f4f129aae70bb30e8dbb255fa09acd6c:/word/quiz.js diff --git a/word/quiz.js b/word/quiz.js index dce5f7a..5498809 100644 --- a/word/quiz.js +++ b/word/quiz.js @@ -7,9 +7,12 @@ Array.prototype.shuffle = function () { }; function hashparams() { - // location.hash is not encoded in firefox - const encodedhash = (window.location.href.split('#'))[1] || ''; - return decodeURIComponent(encodedhash).split('#'); + const encodedhash = window.location.href.split('#').slice(1) || ''; + if (encodedhash.length == 1) { + // location.hash is not encoded in firefox + return decodeURIComponent(encodedhash).split('#'); + } + return encodedhash; } class Words {