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

[tor-commits] [flashproxy/master] Change the badge color while serving a client.



commit 15da5832034c02ce0d0c4ea57cea840765222f4e
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Mon Jul 9 15:40:36 2012 -0700

    Change the badge color while serving a client.
---
 flashproxy.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/flashproxy.js b/flashproxy.js
index a188e96..4252548 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -691,11 +691,18 @@ function Badge() {
     this.elem = table;
 
     this.proxy_begin = function() {
+        if (this.num_proxy_pairs <= 0) {
+            this.idle_color = this.elem.getAttribute("background-color");
+        }
         this.num_proxy_pairs++;
+        this.set_color("#28f");
     };
 
     this.proxy_end = function() {
         this.num_proxy_pairs--;
+        if (this.num_proxy_pairs <= 0) {
+            this.set_color(this.idle_color);
+        }
     }
 
     this.disable = function() {



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