X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/8c60e0a0d2a6c02068e68f42fc76f196087ba516..588ae20483b15e9accb6a14090f127ef87cbf4a5:/word/quiz.js diff --git a/word/quiz.js b/word/quiz.js index e2e8cb6..2385455 100644 --- a/word/quiz.js +++ b/word/quiz.js @@ -44,6 +44,14 @@ class WordQuiz { load(dataurl) { this.preset = {}; + let input; + if (input = window.location.hash.match(/\d+/)) { + this.preset.cat = input[0]; + } + if (window.location.hash.match(/a/)) { + this.preset.level = 3; + } + fetch(dataurl).then(res => res.json()).then(json => { this.words = this.dataselect(json) this.setup();