Sunday, July 8, 2012

Clientless BitTorrent downloads in your browser, using Javascript


BitTorrent Labs have released the alpha version of their 'OneClick Chrome Extension,' a Javascript-based Web app that obviates the need for a separate BitTorrent client. Using their plugin, you can download BitTorrent files as though they were regular, server-hosted downloads. As Patrick Williams explains in a blog post on GitHub,
I stumbled upon the Chrome Extension webRequest api that gives you access to all the http headers for requests in Chrome. Which meant that not only could I filter for .torrent file requests, but I could go one step farther and just wait for a server to serve up a file with the application/x-bittorrent mime type before springing into action. I immediately slowed my ascent up Balmers peek, declined the co-worker invite to Zeitgeist (apparently it was quite the evening), and dove in.

Writing Chome extensions is actually fairly simple. Despite my failure to deliver on the foolishly bold claim I made to Art, saying that I’d have OneClick rewritten as a extension before he left for the day, it really wasn’t too much work. Their getting started page is really precise, and their documentation and examples are really thorough, especially for webRequests.

No comments:

Post a Comment