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

[tor-commits] [flashproxy/js] debug_div doesn't need external visibility.



commit 724153e69c6a811f2a7b7017680661294212eede
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Thu Mar 29 20:08:37 2012 -0700

    debug_div doesn't need external visibility.
---
 flashproxy.js |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/flashproxy.js b/flashproxy.js
index 1dca870..25999d4 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -101,21 +101,21 @@ function format_addr(addr)
 
 function FlashProxy()
 {
-    this.debug_div = document.createElement("pre");
-    this.debug_div.className = "debug";
+    var debug_div = document.createElement("pre");
+    debug_div.className = "debug";
 
-    this.badge_elem = this.debug_div;
+    this.badge_elem = debug_div;
     this.badge_elem.setAttribute("id", "flashproxy-badge");
 
     this.puts = function(s) {
-        if (this.debug_div) {
+        if (debug_div) {
             var at_bottom;
 
             /* 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 + "\n"));
+            at_bottom = (debug_div.scrollTop + debug_div.clientHeight == debug_div.scrollHeight);
+            debug_div.appendChild(document.createTextNode(s + "\n"));
             if (at_bottom)
-                this.debug_div.scrollTop = this.debug_div.scrollHeight;
+                debug_div.scrollTop = debug_div.scrollHeight;
         }
     };
 



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