[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/js] Make debug output use pre not div.



commit 6928215914947d6f722b580c313180dde8565da6
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Sat Mar 24 22:33:43 2012 -0700

    Make debug output use pre not div.
---
 embed.html    |    1 +
 flashproxy.js |    5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/embed.html b/embed.html
index 591f492..c88827b 100644
--- a/embed.html
+++ b/embed.html
@@ -9,6 +9,7 @@ body {
 }
 #flashproxy-badge.debug {
 	position: absolute;
+	margin: 0;
 	left: 0;
 	top: 0;
 	width: 100%;
diff --git a/flashproxy.js b/flashproxy.js
index 43c2342..32497e6 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -91,7 +91,7 @@ function format_addr(addr)
 
 function FlashProxy()
 {
-    this.debug_div = document.createElement("div");
+    this.debug_div = document.createElement("pre");
     this.debug_div.className = "debug";
 
     this.badge_elem = this.debug_div;
@@ -103,8 +103,7 @@ function FlashProxy()
 
             /* http://www.w3.org/TR/cssom-view/#element-scrolling-members */
             at_bottom = (this.debug_div.scrollTop + this.debug_div.clientHeight == this.debug_div.scrollHeight);
-            this.debug_div.appendChild(document.createTextNode(s));
-            this.debug_div.appendChild(document.createElement("br"));
+            this.debug_div.appendChild(document.createTextNode(s + "\n"));
             if (at_bottom)
                 this.debug_div.scrollTop = this.debug_div.scrollHeight;
         }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits