diff options
Diffstat (limited to 'examples/browser-seed.js')
-rw-r--r-- | examples/browser-seed.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/browser-seed.js b/examples/browser-seed.js index 6a6d498..cad1061 100644 --- a/examples/browser-seed.js +++ b/examples/browser-seed.js @@ -1,12 +1,12 @@ -var dragDrop = require('drag-drop/buffer')
-var WebTorrent = require('webtorrent')
-
-var client = new WebTorrent()
-
-// When user drops files on the browser, create a new torrent and start seeding it!
-dragDrop('body', function (files) {
- client.seed(files, function onTorrent (torrent) {
- // Client is seeding the file!
- console.log('Torrent info hash:', torrent.infoHash)
- })
-})
+var dragDrop = require('drag-drop/buffer') +var WebTorrent = require('webtorrent') + +var client = new WebTorrent() + +// When user drops files on the browser, create a new torrent and start seeding it! +dragDrop('body', function (files) { + client.seed(files, function onTorrent (torrent) { + // Client is seeding the file! + console.log('Torrent info hash:', torrent.infoHash) + }) +}) |