From 8836613c437e5ff3f0bc86cb1754756a1b7ba6cb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 19 May 2008 12:28:20 +0100 Subject: [PATCH] debug mode tweaks, remove mouse_handler() --- feedlist.js | 21 --------------------- functions.js | 3 +-- functions.php | 3 +-- prefs.js | 10 ++++------ prefs.php | 2 +- tt-rss.css | 1 - tt-rss.js | 23 ++++------------------- tt-rss.php | 2 +- 8 files changed, 12 insertions(+), 53 deletions(-) diff --git a/feedlist.js b/feedlist.js index 62bfadb5..0020de17 100644 --- a/feedlist.js +++ b/feedlist.js @@ -328,7 +328,6 @@ function feedlist_init() { hideOrShowFeeds(document, getInitParam("hide_read_feeds") == 1); document.onkeydown = hotkey_handler; - document.onmousedown = mouse_handler; setTimeout("timeout()", 0); /* debug("about to remove splash, OMG!"); @@ -468,23 +467,3 @@ function remove_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); - } -} - diff --git a/functions.js b/functions.js index 997bcb13..01de05b2 100644 --- a/functions.js +++ b/functions.js @@ -1,5 +1,4 @@ var hotkeys_enabled = true; -var debug_mode_enabled = false; var xmlhttp_rpc = Ajax.getTransport(); var notify_silent = false; var last_progress_point = 0; @@ -1384,7 +1383,7 @@ function debug(msg) { } 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) { c.removeChild(c.lastChild); } diff --git a/functions.php b/functions.php index 0c333afc..a2d1750c 100644 --- a/functions.php +++ b/functions.php @@ -1533,8 +1533,7 @@ $feed = "$feed_title"; - print "
  • "; + print "
  • "; if (get_pref($link, 'ENABLE_FEED_ICONS')) { print "$feed_icon"; } diff --git a/prefs.js b/prefs.js index 698bc716..41b4d768 100644 --- a/prefs.js +++ b/prefs.js @@ -1447,7 +1447,7 @@ function init() { arguments.callee.done = true; if (getURLParam('debug')) { - document.getElementById('debug_output').style.display = 'block'; + Element.show("debug_output"); debug('debug mode activated'); } @@ -1743,14 +1743,12 @@ function pref_hotkey_handler(e) { if (!hotkey_prefix) { if (keycode == 68 && shift_key) { // d - if (!debug_mode_enabled) { - document.getElementById('debug_output').style.display = 'block'; + if (!Element.visible("debug_output")) { + Element.show("debug_output"); debug('debug mode activated'); } else { - document.getElementById('debug_output').style.display = 'none'; + Element.hide("debug_output"); } - - debug_mode_enabled = !debug_mode_enabled; return; } diff --git a/prefs.php b/prefs.php index 288a5f2b..d411a370 100644 --- a/prefs.php +++ b/prefs.php @@ -84,7 +84,7 @@ if (document.addEventListener) { window.onload = init; - +

    Fatal Error

    diff --git a/tt-rss.css b/tt-rss.css index b92e8f9a..32517c51 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1208,7 +1208,6 @@ a.cdmToggleLink:hover { bottom : 20px; z-index : 999; background-color : white; - display : none; border : 1px solid #c0c0c0; overflow : auto; margin : 0px; diff --git a/tt-rss.js b/tt-rss.js index 5c13ca57..482ddabf 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -338,7 +338,7 @@ function init() { return; if (getURLParam('debug')) { - document.getElementById('debug_output').style.display = 'block'; + Element.show("debug_output"); debug('debug mode activated'); } @@ -967,11 +967,11 @@ function hotkey_handler(e) { if (!hotkey_prefix) { if (keycode == 68 && shift_key) { // d - if (!debug_mode_enabled) { - document.getElementById('debug_output').style.display = 'block'; + if (!Element.visible("debug_output")) { + Element.show("debug_output"); debug('debug mode activated'); } else { - document.getElementById('debug_output').style.display = 'none'; + Element.hide("debug_output"); } return; @@ -1407,18 +1407,3 @@ function 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); - } -} diff --git a/tt-rss.php b/tt-rss.php index c2ef53ce..1de9ce87 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -109,7 +109,7 @@ if (document.addEventListener) { window.onload = init; -
      +
       
      -- 2.39.5