Skip to content

Instantly share code, notes, and snippets.

@newgiin
Created January 18, 2014 18:35
Show Gist options
  • Save newgiin/8494365 to your computer and use it in GitHub Desktop.
Save newgiin/8494365 to your computer and use it in GitHub Desktop.
Diff between my flashproxy.js and that served on http://crypto.stanford.edu/flashproxy/embed.html.
69c69
< var DEFAULT_INITIAL_FACILITATOR_POLL_INTERVAL = DEFAULT_INITIAL_FACILITATOR_POLL_INTERVAL || 60.0;
---
> var DEFAULT_INITIAL_FACILITATOR_POLL_INTERVAL = DEFAULT_INITIAL_FACILITATOR_POLL_INTERVAL || 5.0;
472a473,485
> /*
> * A FlashProxy.
> *
> * start() starts the FlashProxy.
> *
> * The following event listeners can be set to zero-argument functions:
> * 'on_proxy_start' is called each time a proxy pair is succesfully started.
> * 'on_proxy_end' is called only when the total number of proxy pairs returns
> * to zero. Note: If proxies were ended due to FlashProxy
> * becoming disabled, this is not called.
> * 'on_disable' is called once upon disable.
> * 'on_die' is called once upon die.
> */
485a499,502
> this.is_disabled = false;
> this.on_proxy_start = this.on_proxy_end =
> this.on_disable = this.on_die = function() {};
>
675c692,695
< if (this.badge)
---
> // Check if disabled, otherwise badge.proxy_end() could
> // occur after badge.disable() during this proxy_pair callback,
> // resulting in the wrong color.
> if (!this.is_disabled && this.badge)
676a697,701
>
> if (!this.is_disabled && this.proxy_pairs.length <= 0) {
> this.on_proxy_end();
> }
>
687a713
> this.on_proxy_start();
695a722
> this.is_disabled = true;
699a727
> this.on_disable();
705a734
> this.on_die();
921c950
< "ru": { filename: "badge-ru.png", text: "Свобода Интернета" }
---
> "ru": { filename: "badge-ru.png", text: "Свобода Интернета" }
1129c1158
< }
\ No newline at end of file
---
> }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment