[tor-commits] [flashproxy/master] Change the badge color while serving a client.
dcf at torproject.org
dcf at torproject.org
Tue Jul 10 00:28:34 UTC 2012
commit 15da5832034c02ce0d0c4ea57cea840765222f4e
Author: David Fifield <david at bamsoftware.com>
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() {
More information about the tor-commits
mailing list