]> git.wh0rd.org Git - tt-rss.git/commitdiff
prettify debug output
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 4 Mar 2006 10:35:47 +0000 (11:35 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 4 Mar 2006 10:35:47 +0000 (11:35 +0100)
functions.js
tt-rss.css
tt-rss.js
viewfeed.js

index a0d6ecc1e4815664bbcd69eb777638cc2ebcb87a..14939cdc6a937130155bf2d3a8ea90daebb48845 100644 (file)
@@ -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;
+}
index d9cc3b9b9febbb9bf42906f207acf93ae499e6ce..0e2a263f93541f77610278837402718d19d984dc 100644 (file)
@@ -1006,7 +1006,7 @@ div.cdmContent a:hover {
        border : 1px solid #c0c0c0;
        overflow : auto;
        margin : 0px;
-       padding : 5px;
+       padding : 0px;
        list-style-type : none;
 }
 
index aa08b74f7a4e2c72ca237877eb1ec2680d4d9ae2..942ea58085c130511dd57e1d4175b40a1de11f84 100644 (file)
--- 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 = "<li>[" + ts + "] " + msg + "</li>" + c.innerHTML;
        }
 }
index 06a483bccd80556af8b709530b79562f79c613be..2d52a6992acbaee7a373338c4498b254aa7408f5 100644 (file)
@@ -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";