Fixed debugging

This commit is contained in:
Diego Rodríguez 2015-12-06 23:53:33 -05:00
parent 9cc38d0d9a
commit 9d9ef890b5
4 changed files with 4 additions and 7 deletions

View file

@ -13,7 +13,7 @@ opts = {announce: trackers}
client = new WebTorrent client = new WebTorrent
dbg = (string, torrent) -> dbg = (string, torrent) ->
if (window.localStorage ? window.localStorage.getItem('debug') == '*':false) if window.localStorage.getItem('debug')?
if torrent if torrent
console.debug '%c' + torrent.name + ' (' + torrent.infoHash + '): %c' + string, 'color: #33C3F0', 'color: #333' console.debug '%c' + torrent.name + ' (' + torrent.infoHash + '): %c' + string, 'color: #33C3F0', 'color: #333'
return return

View file

@ -11,10 +11,7 @@
client = new WebTorrent; client = new WebTorrent;
dbg = function(string, torrent) { dbg = function(string, torrent) {
var ref; if (window.localStorage.getItem('debug') != null) {
if ((ref = window.localStorage) != null ? ref : window.localStorage.getItem('debug') === {
'*': false
}) {
if (torrent) { if (torrent) {
console.debug('%c' + torrent.name + ' (' + torrent.infoHash + '): %c' + string, 'color: #33C3F0', 'color: #333'); console.debug('%c' + torrent.name + ' (' + torrent.infoHash + '): %c' + string, 'color: #33C3F0', 'color: #333');
return; return;

View file

@ -17,7 +17,7 @@
</head> </head>
<body ng-controller="bTorrentCtrl" ng-cloak=""> <body ng-controller="bTorrentCtrl" ng-cloak="">
<header> <header>
<h1>βTorrent<span class="version"> v0.6.1</span></h1> <h1>βTorrent<span class="version"> v0.6.2</span></h1>
</header> </header>
<div class="container"> <div class="container">
<div class="row"> <div class="row">

View file

@ -18,7 +18,7 @@ html(ng-app='bTorrent', lang='en')
header header
h1 h1
| βTorrent | βTorrent
span.version v0.6.1 span.version v0.6.2
.container .container
.row .row