From 12c4c697f00a703b768ab553e486be9d9f457dee Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Fri, 11 May 2018 13:36:56 -0400 Subject: Set dbg_print() on main_panel.js and clean default output --- html/display_panel/content/main_panel.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js index 8b20ff5..3086859 100644 --- a/html/display_panel/content/main_panel.js +++ b/html/display_panel/content/main_panel.js @@ -31,6 +31,18 @@ * * (Use the variable "webex" for all API calls after calling this) */ + +var PRINT_DEBUG = false; +function dbg_print(a,b){ + if(PRINT_DEBUG == true){ + if(b === undefined){ + console.log(a); + } else{ + console.log(a,b); + } + } +} + var webex; function set_webex(){ if(typeof(browser) == "undefined"){ @@ -183,8 +195,8 @@ function generate_HTML(blocked_data){ for(var i = 0; i < to_clr.length; i++){ to_clr[i].innerHTML = ""; } - console.log("REGEN HTML:"); - console.log(blocked_data); + dbg_print("REGEN HTML:"); + dbg_print(blocked_data); write_elements(blocked_data,"accepted","green"); write_elements(blocked_data,"whitelisted","green"); write_elements(blocked_data,"blocked","red"); -- cgit v1.2.3