From f3f67c1b53d2d93486fc3c57253b8af4d5e7a0c7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 7 Nov 2010 14:38:59 +0300 Subject: [PATCH] remove old-style debugging --- functions.js | 28 +++------------------------- prefs.js | 15 --------------- prefs.php | 3 --- tt-rss.css | 21 --------------------- tt-rss.js | 16 ---------------- tt-rss.php | 5 ----- 6 files changed, 3 insertions(+), 85 deletions(-) diff --git a/functions.js b/functions.js index 8b4945edc..b9096706a 100644 --- a/functions.js +++ b/functions.js @@ -15,9 +15,9 @@ Array.prototype.remove = function(s) { /* create console.log if it doesn't exist */ if (!window.console) console = {}; -console.log = console.log || function(msg) { debug(msg); }; -console.warn = console.warn || function(msg) { debug(msg); }; -console.error = console.error || function(msg) { debug(msg); }; +console.log = console.log || function(msg) { }; +console.warn = console.warn || function(msg) { }; +console.error = console.error || function(msg) { }; function exception_error(location, e, ext_info) { var msg = format_exception_error(location, e); @@ -1356,28 +1356,6 @@ function filterCR(e, f) } } -var debug_last_class = "even"; - -function debug(msg) { - - if (debug_last_class == "even") { - debug_last_class = "odd"; - } else { - debug_last_class = "even"; - } - - var c = $('debug_output'); - if (c && Element.visible(c)) { - while (c.lastChild != 'undefined' && c.childNodes.length > 100) { - c.removeChild(c.lastChild); - } - - var ts = make_timestamp(); - c.innerHTML = "
  • [" + ts + "] " + - msg + "
  • " + c.innerHTML; - } -} - function getInitParam(key) { return init_params[key]; } diff --git a/prefs.js b/prefs.js index 33887b15e..c2f9d65c0 100644 --- a/prefs.js +++ b/prefs.js @@ -1150,11 +1150,6 @@ function init() { try { - if (getURLParam('debug')) { - Element.show("debug_output"); - console.log('debug mode activated'); - } - loading_set_progress(30); var query = "?op=rpc&subop=sanityCheck"; @@ -1353,16 +1348,6 @@ function pref_hotkey_handler(e) { if (!hotkey_prefix) { - if (keycode == 68 && shift_key) { // d - if (!Element.visible("debug_output")) { - Element.show("debug_output"); - console.log('debug mode activated'); - } else { - Element.hide("debug_output"); - } - return; - } - if ((keycode == 191 || keychar == '?') && shift_key) { // ? if (!Element.visible("hotkey_help_overlay")) { //Element.show("hotkey_help_overlay"); diff --git a/prefs.php b/prefs.php index c0aad8a68..416089698 100644 --- a/prefs.php +++ b/prefs.php @@ -83,8 +83,6 @@ - -