diff --git a/README.md b/README.md index 6f1e86d..8eaba8a 100644 --- a/README.md +++ b/README.md @@ -36,14 +36,14 @@ harp server ``` ### Enable Debugging -Enable 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: +Enable βTorrent (Debug logging) and WebTorrent (Logs logging) debug logs by running this in the developer console: ```js localStorage.debug = '*' ``` +Disable by running this: +```js +localStorage.removeItem('debug') +``` ### Help βTorrent - **[Create a new issue](https://github.com/DiegoRBaquero/bTorrent/issues/new)** to report bugs or suggest new features diff --git a/app.coffee b/app.coffee index 561a4ab..1b66dc7 100644 --- a/app.coffee +++ b/app.coffee @@ -11,7 +11,7 @@ trackers = [ opts = {announce: trackers} client = new WebTorrent -debug = true +debug = window.localStorage ? window.localStorage.getItem('debug') == '*':false app = angular.module 'bTorrent', [], ['$compileProvider','$locationProvider', ($compileProvider, $locationProvider) -> $compileProvider.aHrefSanitizationWhitelist /^\s*(https?|magnet|blob|javascript):/