diff options
Diffstat (limited to 'lib/login.js')
-rw-r--r-- | lib/login.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/login.js b/lib/login.js index 29ab9a3..fb0e81b 100644 --- a/lib/login.js +++ b/lib/login.js @@ -181,10 +181,14 @@ module.exports = { } else { $('tbody tr').map(function map(i, item) { - var current = $(item), text = current.children().first().text(), href = $(current.find('a')).attr('href'); - if (href) { - list.push({ name: text, value: host + $(current.find('a')).attr('href') }); - } + var current = $(item), + text = current.children().first().text(), + href = $(current.children().last().find('a')).attr('href'); + + if (text) { text = text.trim(); } + + if (href) { list.push({ name: text, value: host + href }); } + }); if (list.length) { list.unshift({name: 'All', value: 'all', checked: true}, {name: 'Cancel', value: 'cancel'}); } |