From 5dab14a97e532c548e72b33334d2d9b1853330c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez?= Date: Tue, 1 Dec 2015 02:02:20 -0500 Subject: [PATCH] Moved to localStorage, allows to permanently save debugging choice --- README.md | 10 +++++----- app.coffee | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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):/