remove old-style debugging

This commit is contained in:
Andrew Dolgov 2010-11-07 14:38:59 +03:00
parent 3fb63f75a2
commit f3f67c1b53
6 changed files with 3 additions and 85 deletions

View File

@ -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 = "<li class=\"" + debug_last_class + "\"><span class=\"debugTS\">[" + ts + "]</span> " +
msg + "</li>" + c.innerHTML;
}
}
function getInitParam(key) {
return init_params[key];
}

View File

@ -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");

View File

@ -83,8 +83,6 @@
<img id="piggie" src="images/piggie.png" style="display : none" alt="piggie"/>
<ul id="debug_output" style='display : none'><li>&nbsp;</li></ul>
<div id="prefHeader">
<div class="topLinks">
<?php if (!SINGLE_USER_MODE) { ?>
@ -133,7 +131,6 @@
<div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
<div id="infoBoxShadow"><div id="infoBox">BAH</div></div>
<div id="cmdline" style="display : none"></div>
<div id="errorBoxShadow" style="display : none">

View File

@ -1095,27 +1095,6 @@ a.cdmToggleLink:hover {
border-width : 0px;
}
#debug_output {
position : absolute;
width : 400px;
height : 200px;
right : 20px;
bottom : 20px;
z-index : 999;
background-color : white;
border : 1px solid #c0c0c0;
overflow : auto;
margin : 0px;
padding : 0px;
list-style-type : none;
}
#debug_output li {
margin : 0px;
padding : 0px;
font-size : 11px;
}
#dialog_overlay {
left : 0;
top : 0;

View File

@ -272,11 +272,6 @@ function init() {
if (!genericSanityCheck())
return;
if (getURLParam('debug')) {
Element.show("debug_output");
console.log('debug mode activated');
}
var params = "&ua=" + param_escape(navigator.userAgent);
loading_set_progress(30);
@ -935,17 +930,6 @@ function 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");

View File

@ -85,13 +85,8 @@
</div>
<div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
<div id="dialog_overlay" style="display : none"> </div>
<ul id="debug_output" style='display : none'><li>&nbsp;</li></ul>
<div id="infoBoxShadow" style="display : none"><div id="infoBox">&nbsp;</div></div>
<div id="cmdline" style="display : none"></div>
<div id="auxDlg" style="display : none"></div>