word/edit: track touch events in crop area
[sheet.git] / word / quiz.js
index e2e8cb6adc412ebeab12aa1e5bc09cd790601f81..2385455ea0ff6e3d3a641b08ba0e8a87e1bf6401 100644 (file)
@@ -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();