debug mode tweaks, remove mouse_handler()

This commit is contained in:
Andrew Dolgov 2008-05-19 12:28:20 +01:00
parent 19d7bfcd1d
commit 8836613c43
8 changed files with 12 additions and 53 deletions

View File

@ -328,7 +328,6 @@ function feedlist_init() {
hideOrShowFeeds(document, getInitParam("hide_read_feeds") == 1); hideOrShowFeeds(document, getInitParam("hide_read_feeds") == 1);
document.onkeydown = hotkey_handler; document.onkeydown = hotkey_handler;
document.onmousedown = mouse_handler;
setTimeout("timeout()", 0); setTimeout("timeout()", 0);
/* debug("about to remove splash, OMG!"); /* debug("about to remove splash, OMG!");
@ -468,23 +467,3 @@ function remove_splash() {
debug("removed splash!"); debug("removed splash!");
} }
} }
function feedMouseIn(id) {
try {
if (feed_under_pointer != id) {
feed_under_pointer = id;
}
} catch (e) {
exception_error("feedMouseIn", e);
}
}
function feedMouseOut(id) {
try {
feed_under_pointer = undefined;
} catch (e) {
exception_error("feedMouseOut", e);
}
}

View File

@ -1,5 +1,4 @@
var hotkeys_enabled = true; var hotkeys_enabled = true;
var debug_mode_enabled = false;
var xmlhttp_rpc = Ajax.getTransport(); var xmlhttp_rpc = Ajax.getTransport();
var notify_silent = false; var notify_silent = false;
var last_progress_point = 0; var last_progress_point = 0;
@ -1384,7 +1383,7 @@ function debug(msg) {
} }
var c = document.getElementById('debug_output'); var c = document.getElementById('debug_output');
if (c && c.style.display == "block") { if (c && Element.visible(c)) {
while (c.lastChild != 'undefined' && c.childNodes.length > 100) { while (c.lastChild != 'undefined' && c.childNodes.length > 100) {
c.removeChild(c.lastChild); c.removeChild(c.lastChild);
} }

View File

@ -1533,8 +1533,7 @@
$feed = "<a title=\"$link_title\" id=\"FEEDL-$feed_id\" $feed = "<a title=\"$link_title\" id=\"FEEDL-$feed_id\"
href=\"javascript:viewfeed('$feed_id', '', false, '', false, 0);\">$feed_title</a>"; href=\"javascript:viewfeed('$feed_id', '', false, '', false, 0);\">$feed_title</a>";
print "<li id=\"FEEDR-$feed_id\" class=\"$class\" print "<li id=\"FEEDR-$feed_id\" class=\"$class\">";
onmouseover='feedMouseIn($feed_id)' onmouseout='feedMouseOut($feed_id)'>";
if (get_pref($link, 'ENABLE_FEED_ICONS')) { if (get_pref($link, 'ENABLE_FEED_ICONS')) {
print "$feed_icon"; print "$feed_icon";
} }

View File

@ -1447,7 +1447,7 @@ function init() {
arguments.callee.done = true; arguments.callee.done = true;
if (getURLParam('debug')) { if (getURLParam('debug')) {
document.getElementById('debug_output').style.display = 'block'; Element.show("debug_output");
debug('debug mode activated'); debug('debug mode activated');
} }
@ -1743,14 +1743,12 @@ function pref_hotkey_handler(e) {
if (!hotkey_prefix) { if (!hotkey_prefix) {
if (keycode == 68 && shift_key) { // d if (keycode == 68 && shift_key) { // d
if (!debug_mode_enabled) { if (!Element.visible("debug_output")) {
document.getElementById('debug_output').style.display = 'block'; Element.show("debug_output");
debug('debug mode activated'); debug('debug mode activated');
} else { } else {
document.getElementById('debug_output').style.display = 'none'; Element.hide("debug_output");
} }
debug_mode_enabled = !debug_mode_enabled;
return; return;
} }

View File

@ -84,7 +84,7 @@ if (document.addEventListener) {
window.onload = init; window.onload = init;
</script> </script>
<ul id="debug_output"></ul> <ul id="debug_output" style='display : none'></ul>
<div id="fatal_error"><div id="fatal_error_inner"> <div id="fatal_error"><div id="fatal_error_inner">
<h1>Fatal Error</h1> <h1>Fatal Error</h1>

View File

@ -1208,7 +1208,6 @@ a.cdmToggleLink:hover {
bottom : 20px; bottom : 20px;
z-index : 999; z-index : 999;
background-color : white; background-color : white;
display : none;
border : 1px solid #c0c0c0; border : 1px solid #c0c0c0;
overflow : auto; overflow : auto;
margin : 0px; margin : 0px;

View File

@ -338,7 +338,7 @@ function init() {
return; return;
if (getURLParam('debug')) { if (getURLParam('debug')) {
document.getElementById('debug_output').style.display = 'block'; Element.show("debug_output");
debug('debug mode activated'); debug('debug mode activated');
} }
@ -967,11 +967,11 @@ function hotkey_handler(e) {
if (!hotkey_prefix) { if (!hotkey_prefix) {
if (keycode == 68 && shift_key) { // d if (keycode == 68 && shift_key) { // d
if (!debug_mode_enabled) { if (!Element.visible("debug_output")) {
document.getElementById('debug_output').style.display = 'block'; Element.show("debug_output");
debug('debug mode activated'); debug('debug mode activated');
} else { } else {
document.getElementById('debug_output').style.display = 'none'; Element.hide("debug_output");
} }
return; return;
@ -1407,18 +1407,3 @@ function hotkey_handler(e) {
exception_error("hotkey_handler", e); exception_error("hotkey_handler", e);
} }
} }
function mouse_handler(e) {
try {
var r_mouse = false;
if (window.event) {
r_mouse = window.event.button == 2;
} else if (e) {
r_mouse = e.which == 3;
}
} catch (e) {
exception_error("mouse_handler", e);
}
}

View File

@ -109,7 +109,7 @@ if (document.addEventListener) {
window.onload = init; window.onload = init;
</script> </script>
<ul id="debug_output"></ul> <ul id="debug_output" style='display : none'></ul>
<div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div> <div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div>