[tor-commits] [flashproxy/master] Make abstract color-setting badge functions.
dcf at torproject.org
dcf at torproject.org
Tue Jul 10 00:28:34 UTC 2012
commit 6c1ffe81834ca762a1218795fe885cb7ce33a018
Author: David Fifield <david at bamsoftware.com>
Date: Mon Jul 9 15:23:16 2012 -0700
Make abstract color-setting badge functions.
---
flashproxy.js | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/flashproxy.js b/flashproxy.js
index 321a708..a188e96 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -455,12 +455,12 @@ function FlashProxy() {
this.make_proxy_pair = function(client_addr, relay_addr) { };
while (this.proxy_pairs.length > 0)
this.proxy_pairs.pop().close();
- this.badge.set_color("#777");
+ this.badge.disable();
};
this.die = function() {
puts("die");
- this.badge.set_color("#111");
+ this.badge.die();
};
}
@@ -698,6 +698,14 @@ function Badge() {
this.num_proxy_pairs--;
}
+ this.disable = function() {
+ this.set_color("#777");
+ }
+
+ this.die = function() {
+ this.set_color("#111");
+ }
+
this.set_color = function(color) {
this.elem.style.backgroundColor = color;
};
More information about the tor-commits
mailing list