handle pasting a line that ends in /n better
This commit is contained in:
2
index.js
2
index.js
@@ -150,6 +150,8 @@ var template = [
|
|||||||
click: function () {
|
click: function () {
|
||||||
var torrentIds = electron.clipboard.readText().split('\n')
|
var torrentIds = electron.clipboard.readText().split('\n')
|
||||||
torrentIds.forEach(function (torrentId) {
|
torrentIds.forEach(function (torrentId) {
|
||||||
|
torrentId = torrentId.trim()
|
||||||
|
if (torrentId.length === 0) return
|
||||||
mainWindow.send('action', 'addTorrent', torrentId)
|
mainWindow.send('action', 'addTorrent', torrentId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user