mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
Initialize snowflake instance with a config
This commit is contained in:
parent
edbbea1d03
commit
2d8a1690ba
11 changed files with 125 additions and 113 deletions
|
@ -22,10 +22,10 @@ class Util
|
|||
@genSnowflakeID: ->
|
||||
Math.random().toString(36).substring(2)
|
||||
|
||||
@snowflakeIsDisabled = ->
|
||||
@snowflakeIsDisabled = (cookieName) ->
|
||||
cookies = Parse.cookie document.cookie
|
||||
# Do nothing if snowflake has not been opted in by user.
|
||||
if cookies[COOKIE_NAME] != '1'
|
||||
if cookies[cookieName] != '1'
|
||||
log 'Not opted-in. Please click the badge to change options.'
|
||||
return true
|
||||
# Also do nothing if running in Tor Browser.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue