Removed www build

This commit is contained in:
Diego Rodríguez 2015-11-30 13:54:32 -05:00
parent 5c0f8833b2
commit 6d15f4b05f
3 changed files with 0 additions and 3 deletions

View file

@ -1 +0,0 @@
var app,client,debug;client=new WebTorrent;debug=true;app=angular.module("bTorrent",[],["$compileProvider","$locationProvider",function(e,n){e.aHrefSanitizationWhitelist(/^\s*(https?|magnet|blob|javascript):/);n.html5Mode({enabled:true,requireBase:false}).hashPrefix("#")}]);app.controller("bTorrentCtrl",["$scope","$http","$log","$location",function(e,n,t,o){var r,i;e.client=client;e.seedIt=true;r=function(e,n){if(debug){if(n){t.debug("%c"+n.name+" ("+n.infoHash+"): %c"+e,"color: #33C3F0","color: #333")}else{t.debug("%cClient: %c"+e,"color: #33C3F0","color: #333")}}};i=function(){e.$apply()};setInterval(i,500);e.client.done=function(){var n;n=true;e.client.torrents.forEach(function(e){if(!e.done){n=false}});return n};e.client.downloading=function(){var n;n=true;e.client.torrents.forEach(function(e){if(e.done){n=false}});return n};e.uploadFile=function(){document.getElementById("fileUpload").click()};e.uploadFile2=function(n){e.client.processing=true;r("Seeding "+n.files[0].name);e.client.seed(n.files,e.onSeed)};e.fromInput=function(){if(!e.torrentInput===""){e.client.processing=true;r("Adding "+e.torrentInput);e.client.add(e.torrentInput,e.onTorrent);e.torrentInput=""}};e.toggleTorrent=function(n){if(n.showFiles){n.showFiles=false;e.sTorrent=null}else{e.client.torrents.forEach(function(e){e.showFiles=false});n.showFiles=true;e.sTorrent=n}};e.destroyedTorrent=function(e){if(e){throw e}r("Destroyed torrent")};e.onTorrent=function(n,t){e.client.processing=false;n.showFiles=false;n.fileName=n.name+".torrent";n.oTorrentFileURL=n.torrentFileURL;if(angular.isUndefined(e.sTorrent)||e.sTorrent===null){e.sTorrent=n;n.showFiles=true}n.update=function(){var e;n.pProgress=(100*n.progress).toFixed(1);n.pDownloaded=n.downloaded;n.pUploaded=n.uploaded;n.pUploadSpeed=n.uploadSpeed();n.pDownloadSpeed=n.downloadSpeed();if(n.done){n.tRemaining="Done"}else{e=moment.duration(n.timeRemaining/1e3,"seconds").humanize();n.tRemaining=e[0].toUpperCase()+e.substr(1)}};n.files.forEach(function(o){o.pSize=o.length;o.status="Downloading";o.url="javascript: return false;";o.getBlobURL(function(i,l){if(i){throw i}o.url=l;if(!t){r("Finished downloading file "+o.name,n)}o.status="Ready";e.$apply()});if(!t){r("Received file "+o.name+" metadata",n)}});n.on("download",function(e){if(!t){r("Downloaded chunk",n)}});n.on("upload",function(e){r("Uploaded chunk",n)});n.on("done",function(){if(!t){r("Done",n)}n.update()});n.on("wire",function(e,t){r("Wire "+t,n)});setInterval(n.update,500);n.update()};e.onSeed=function(n){e.onTorrent(n,true)};if(o.hash()!==""){e.client.processing=true;r("Adding "+o.hash());client.add(o.hash(),e.onTorrent)}}]);app.filter("html",["$sce",function(e){return function(n){return e.trustAsHtml(n)}}]);app.filter("pbytes",function(){return function(e){var n,t,o,r;n=void 0;o=void 0;t=e<0;r=["B","kB","MB","GB","TB","PB","EB","ZB","YB"];if(t){e=-e}if(e<1){return(t?"-":"")+e+" B"}n=Math.min(Math.floor(Math.log(e)/Math.log(1e3)),r.length-1);e=(e/Math.pow(1e3,n)).toFixed(1)*1;o=r[n];return(t?"-":"")+e+" "+o}});

View file

@ -1 +0,0 @@
<!DOCTYPE html><html ng-app="bTorrent" lang="en"><head><base href=""><meta charset="UTF-8"><title>βTorrent: Browser WebTorrent Client</title><meta name="description" content="βTorrent: Browser WebTorrent Client"><meta name="keywords" content="βTorrent, btorrent, client, webtorrent, browser, torrent"><meta name="author" content="Diego Rodríguez Baquero - DiegoRBaquero"><meta name="viewport" content="width=device-width, initial-scale=1"><script src="https://cdn.jsdelivr.net/g/webtorrent@0.62,momentjs@2.10,angularjs@1.4"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/g/normalize@3.0,skeleton@2.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/fontawesome/4.5/css/font-awesome.min.css"><link rel="stylesheet" href="style.css"></head><body><header><h1>βTorrent<span class="version"> v0.4.1</span></h1></header><div ng-controller="bTorrentCtrl" ng-cloak="" class="container"><div class="row"><div class="twelve columns"><div class="row"><div class="five columns"><input id="torrentInput" type="text" placeholder="magnet link or hash" ng-model="torrentInput" class="u-full-width"></div><div class="two columns"><button ng-click="fromInput()" class="button-primary"><i class="fa fa-download"></i> Download</button></div><div class="five columns u-pull-right"><input id="fileUpload" type="file" style="display: none;" onchange="angular.element(this).scope().uploadFile2(this)"><label class="u-pull-right"><button ng-click="uploadFile()" class="button-primary"><i class="fa fa-upload"></i> Seed a file</button></label></div></div><table class="u-full-width"><thead><tr><th>Name</th><th ng-hide="client.done()">Downloaded</th><th ng-hide="client.done()">Remaining</th><th ng-hide="client.downloading()">Uploaded</th><th>Peers</th><th>Share</th><th>Actions</th></tr></thead><tbody ng-hide="client.torrents.length"><tr><td colspan="100" class="center">Add a torrent o seed a file!</td></tr></tbody><tbody ng-repeat="torrent in client.torrents" ng-if="torrent.name"><tr ng-class="{selectedTorrent: torrent.showFiles}" class="torrentRow"><td><div><i ng-hide="torrent.done" class="fa fa-cloud-download"></i><i ng-show="torrent.done" class="fa fa-check"></i> {{torrent.name}}</div><span class="subInfo">{{torrent.length | pbytes}} in <a href="#" onclick="return false;" ng-click="toggleTorrent(torrent)">{{torrent.files.length}} files</a></span></td><td ng-hide="client.done()">{{torrent.downloaded | pbytes}}<span class="subInfo">({{torrent.pProgress}}%)</span><br><span class="subInfo">@ {{torrent.downloadSpeed() | pbytes}}/s</span></td><td ng-hide="client.done()">{{torrent.tRemaining}}</td><td ng-hide="client.downloading()">{{torrent.uploaded | pbytes}}<br><span class="subInfo">@ {{torrent.uploadSpeed() | pbytes}}/s</span></td><td>{{torrent.swarm.wires.length}}</td><td><a href="#{{torrent.infoHash}}" target="_blank">βTorrent</a> <a href="{{torrent.magnetURI}}" target="_blank">Magnet URI</a> <a href="{{torrent.oTorrentFileURL}}" target="_blank" download="{{torrent.fileName}}">.torrent</a><br><span class="subInfo"><i class="fa fa-hashtag"></i>{{torrent.infoHash}}</span></td><td><i ng-click="client.remove(torrent, destroyedTorrent)" class="fa fa-times"></i></td></tr><tr ng-show="torrent.showFiles"><td colspan="100" class="files"><div class="row"><div class="two columns center"><i class="fa fa-file"></i><strong>Files:</strong></div><div class="ten columns fix-height"><ul class="no-margin"><li ng-repeat="file in torrent.files"><span ng-hide="file.done">{{file.status}}: {{file.name}}</span><a href="{{file.url}}" download="{{file.name}}" target="_blank" ng-show="file.done">{{file.name}}</a><span class="subInfo"> {{file.length | pbytes}}</span></li></ul></div></div></td></tr></tbody><tbody ng-show="client.processing"><tr><td colspan="100" class="center">Please wait a few seconds!</td></tr></tbody></table></div></div></div><footer>Made in Bogotá, Colombia by<a href="http://diegorbaquero.com">DiegoRBaquero</a><br><small><a href="https://webtorrent.io">WebTorrent</a> is powered by JavaScript and WebRTC. Works in Chrome, Firefox, and Opera (desktop and Android).</small><p></p></footer><script src="app.js"></script></body></html>

View file

@ -1 +0,0 @@
body{height:100%;width:100%}header,footer,.center{text-align:center}th,td{padding-left:10px;padding-right:10px;max-width:200px;overflow:scroll;white-space:nowrap}.version{color:#ccc;font-size:0.3em}.torrentRow{line-height:1.2;border-bottom:0}.subInfo{color:#bbb;font-size:0.7em}.column,.columns{margin-left:1%}.files{padding-top:1px;padding-bottom:1px}.fix-height{max-height:24px}.no-margin{margin:0}.selectedTorrent{background:#646464;background:rgba(100,100,100,0.06)}