Moved to localStorage, allows to permanently save debugging choice

This commit is contained in:
Diego Rodríguez 2015-12-01 02:02:20 -05:00
parent 2e22f7be2e
commit 5dab14a97e
2 changed files with 6 additions and 6 deletions

View file

@ -36,14 +36,14 @@ harp server
``` ```
### Enable Debugging ### Enable Debugging
Enable debug logs by running this in the developer console: Enable βTorrent (Debug logging) and WebTorrent (Logs logging) debug logs by running this in the developer console:
```js
debug = true
```
Enable WebTorrent and its submodules debug logs by running this in the developer console:
```js ```js
localStorage.debug = '*' localStorage.debug = '*'
``` ```
Disable by running this:
```js
localStorage.removeItem('debug')
```
### Help βTorrent ### Help βTorrent
- **[Create a new issue](https://github.com/DiegoRBaquero/bTorrent/issues/new)** to report bugs or suggest new features - **[Create a new issue](https://github.com/DiegoRBaquero/bTorrent/issues/new)** to report bugs or suggest new features

View file

@ -11,7 +11,7 @@ trackers = [
opts = {announce: trackers} opts = {announce: trackers}
client = new WebTorrent client = new WebTorrent
debug = true debug = window.localStorage ? window.localStorage.getItem('debug') == '*':false
app = angular.module 'bTorrent', [], ['$compileProvider','$locationProvider', ($compileProvider, $locationProvider) -> app = angular.module 'bTorrent', [], ['$compileProvider','$locationProvider', ($compileProvider, $locationProvider) ->
$compileProvider.aHrefSanitizationWhitelist /^\s*(https?|magnet|blob|javascript):/ $compileProvider.aHrefSanitizationWhitelist /^\s*(https?|magnet|blob|javascript):/