[tor-commits] [flashproxy/js] Click the badge to disable it.

dcf at torproject.org dcf at torproject.org
Thu Apr 5 07:11:47 UTC 2012


commit c1ae2bc401a7272f63e537064b4afc07b207f137
Author: David Fifield <david at bamsoftware.com>
Date:   Thu Apr 5 00:07:41 2012 -0700

    Click the badge to disable it.
    
    Unfortunately this also removes the hyperlink to the info page.
---
 flashproxy.js |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/flashproxy.js b/flashproxy.js
index 11964f1..a7406a8 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -49,8 +49,6 @@
  * http://autobahn.ws/testsuite/reports/clients/index.html
  */
 
-var FLASHPROXY_INFO_URL = "https://crypto.stanford.edu/flashproxy/";
-
 var DEFAULT_FACILITATOR_ADDR = {
     host: "tor-facilitator.bamsoftware.com",
     port: 9002
@@ -291,6 +289,10 @@ function make_websocket(addr)
 function FlashProxy()
 {
     this.badge = new Badge();
+    /* Click the badge to disable it. */
+    this.badge.elem.onclick = function(event) {
+        this.disable();
+    }.bind(this);
     if (query.debug)
         this.badge_elem = debug_div;
     else
@@ -680,17 +682,13 @@ function Badge()
 
     this.counter_text = document.createElement("td");
 
-    var div, a, img, table, tr, td;
+    var div, img, table, tr, td;
 
     div = document.createElement("div");
 
-    a = document.createElement("a");
-    a.setAttribute("href", FLASHPROXY_INFO_URL);
-    div.appendChild(a);
-
     img = document.createElement("img");
     img.setAttribute("src", "badge.png");
-    a.appendChild(img);
+    div.appendChild(img);
 
     table = document.createElement("table");
     div.appendChild(table)



More information about the tor-commits mailing list