From 0bf0cddc5c6c8bce34a9df1e376759eb5773d16b Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Mon, 5 Sep 2016 16:29:30 +0200 Subject: I think I actualy did safari this time --- public/javascripts/bundle.js | 8 ++++++-- public/javascripts/getUsers.js | 6 +++++- public/javascripts/main.js | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'public') diff --git a/public/javascripts/bundle.js b/public/javascripts/bundle.js index 0b22d45..f0b523a 100644 --- a/public/javascripts/bundle.js +++ b/public/javascripts/bundle.js @@ -96749,7 +96749,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) { @@ -96825,7 +96829,7 @@ getUsers().then(function (users) { results = fuzzy.filter(inputNode.value, users, { pre: '', post: '', - extract: el => el.value + extract: function (el) { return el.value } }).slice(0, 7) matches = results.map(function (el) { return el.string }) 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) { diff --git a/public/javascripts/main.js b/public/javascripts/main.js index f311e17..0235bf6 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -38,7 +38,7 @@ getUsers().then(function (users) { results = fuzzy.filter(inputNode.value, users, { pre: '', post: '', - extract: el => el.value + extract: function (el) { return el.value } }).slice(0, 7) matches = results.map(function (el) { return el.string }) -- cgit v1.1