From cf1bc085fad8d1cf3133124af990372b932c9436 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 4 Mar 2006 11:35:47 +0100 Subject: [PATCH] prettify debug output --- functions.js | 6 +++++- tt-rss.css | 2 +- tt-rss.js | 3 ++- viewfeed.js | 25 +------------------------ 4 files changed, 9 insertions(+), 27 deletions(-) diff --git a/functions.js b/functions.js index a0d6ecc1..14939cdc 100644 --- a/functions.js +++ b/functions.js @@ -849,4 +849,8 @@ function getURLParam(strParamName){ return strReturn; } - +function leading_zero(p) { + var s = String(p); + if (s.length == 1) s = "0" + s; + return s; +} diff --git a/tt-rss.css b/tt-rss.css index d9cc3b9b..0e2a263f 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1006,7 +1006,7 @@ div.cdmContent a:hover { border : 1px solid #c0c0c0; overflow : auto; margin : 0px; - padding : 5px; + padding : 0px; list-style-type : none; } diff --git a/tt-rss.js b/tt-rss.js index aa08b74f..942ea580 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -709,7 +709,8 @@ function debug(msg) { } var d = new Date(); - var ts = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds(); + var ts = leading_zero(d.getHours()) + ":" + leading_zero(d.getMinutes()) + + ":" + leading_zero(d.getSeconds()); c.innerHTML = "
  • [" + ts + "] " + msg + "
  • " + c.innerHTML; } } diff --git a/viewfeed.js b/viewfeed.js index 06a483bc..2d52a699 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1,5 +1,4 @@ var active_post_id = false; -var total_unread = 0; var xmlhttp_rpc = false; @@ -24,7 +23,7 @@ if (!xmlhttp_rpc && typeof XMLHttpRequest!='undefined') { function view(id, feed_id) { -// p_notify("Loading article..."); + parent.debug("loading article: " + id + "/" + feed_id); var f_document = parent.frames["feeds-frame"].document; var h_document = document; @@ -34,26 +33,6 @@ function view(id, feed_id) { var crow = h_document.getElementById("RROW-" + id); -/* if (crow.className.match("Unread")) { - var umark = f_document.getElementById("FEEDU-" + feed_id); - - umark.innerHTML = umark.innerHTML - 1; - crow.className = crow.className.replace("Unread", ""); - - if (umark.innerHTML == "0") { - var feedr = f_document.getElementById("FEEDR-" + feed_id); - feedr.className = feedr.className.replace("Unread", ""); - - var feedctr = f_document.getElementById("FEEDCTR-" + feed_id); - - if (feedctr) { - feedctr.className = "invisible"; - } - } - - total_unread--; - } */ - crow.className = crow.className.replace("Unread", ""); cleanSelected("headlinesList"); @@ -92,8 +71,6 @@ function toggleMark(id) { var vfeedu = f_document.getElementById("FEEDU--1"); var crow = document.getElementById("RROW-" + id); -// alert(vfeedu); - if (mark_img.alt != "Reset mark") { mark_img.src = "images/mark_set.png"; mark_img.alt = "Reset mark"; -- 2.39.5