diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-09-05 16:29:30 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-09-05 16:29:30 +0200 |
commit | 0bf0cddc5c6c8bce34a9df1e376759eb5773d16b (patch) | |
tree | fbd447fc33ecb31a7234514821cf345624ee78c2 /public/javascripts/getUsers.js | |
parent | 8e4c9d666672e415957ae8b99e7ab400342f8b98 (diff) |
I think I actualy did safari this time
Diffstat (limited to 'public/javascripts/getUsers.js')
-rw-r--r-- | public/javascripts/getUsers.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/public/javascripts/getUsers.js b/public/javascripts/getUsers.js index 34f7b3b..ac09ef4 100644 --- a/public/javascripts/getUsers.js +++ b/public/javascripts/getUsers.js @@ -13,7 +13,11 @@ module.exports = function () { const scriptText = $script.text() const regexs = [/var classes = \[(.+)\];/, /var teachers = \[(.+)\];/, /var rooms = \[(.+)\];/, /var students = \[(.+)\];/] - const items = regexs.map(regex => scriptText.match(regex)[1].split(',').map(item => item.replace(/"/g, ''))) + const items = regexs.map(function (regex) { + return scriptText.match(regex)[1].split(',').map(function (item) { + return item.replace(/"/g, '') + }) + }) resolve([] .concat(items[0].map(function (item, index) { |