diff options
author | Ruben Rodriguez <ruben@fsf.org> | 2018-05-11 13:36:56 -0400 |
---|---|---|
committer | Ruben Rodriguez <ruben@fsf.org> | 2018-05-11 13:36:56 -0400 |
commit | 12c4c697f00a703b768ab553e486be9d9f457dee (patch) | |
tree | 0925d670b57240b559785f7099236805a420da7f /html | |
parent | e038916fe397368a7fee8ffa86dbd6c025b8d993 (diff) |
Set dbg_print() on main_panel.js and clean default output
Diffstat (limited to 'html')
-rw-r--r-- | html/display_panel/content/main_panel.js | 16 |
1 files 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"); |