diff options
| author | Alex Yatskov <alex@foosoft.net> | 2017-04-06 21:07:55 -0700 | 
|---|---|---|
| committer | Alex Yatskov <alex@foosoft.net> | 2017-04-06 21:07:55 -0700 | 
| commit | bbe4afecf6a56f4bdaaafe083a3bf67191fd9cde (patch) | |
| tree | 2aaecfd3ab5dea3d4a9ca8071dd801c28fa2ebb6 /ext/mixed/js/util.js | |
| parent | e6b592b4c06ee18017a03bb5148e2c4b64deb146 (diff) | |
wip
Diffstat (limited to 'ext/mixed/js/util.js')
| -rw-r--r-- | ext/mixed/js/util.js | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/mixed/js/util.js b/ext/mixed/js/util.js index c05fb679..aeeb830e 100644 --- a/ext/mixed/js/util.js +++ b/ext/mixed/js/util.js @@ -18,6 +18,20 @@  /* + * Cloze + */ + +function clozeBuild(sentence, offset, source) { +    return { +        sentence: sentence.trim(), +        prefix: sentence.substring(0, offset).trim(), +        body: source.trim(), +        suffix: sentence.substring(offset + source.length).trim() +    }; +} + + +/*   * Audio   */  |