Allow dragging magnet links (Fix #284)

This commit is contained in:
Feross Aboukhadijeh
2016-08-03 20:26:46 -07:00
parent b3d0edfec1
commit 67409214a4
2 changed files with 6 additions and 3 deletions

View File

@@ -90,8 +90,11 @@ function onState (err, _state) {
app = ReactDOM.render(<App state={state} />, document.querySelector('#body'))
// OS integrations:
// ...drag and drop a torrent or video file to play or seed
dragDrop('body', onOpen)
// ...drag and drop files/text to start torrenting or seeding
dragDrop('body', {
onDrop: onOpen,
onDropText: onOpen
})
// ...same thing if you paste a torrent
document.addEventListener('paste', onPaste)