mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Fix logging inactive to ui
This commit is contained in:
parent
af70d49e96
commit
5212eda6b2
1 changed files with 6 additions and 6 deletions
|
@ -206,12 +206,6 @@ log = (msg) ->
|
|||
dbg = (msg) -> log msg if DEBUG or snowflake.ui?.debug
|
||||
|
||||
init = (isNode) ->
|
||||
cookies = Parse.cookie document.cookie
|
||||
# Do nothing if snowflake has not been opted in.
|
||||
if cookies[COOKIE_NAME] != "1"
|
||||
log 'Not activate. Please click the badge to change options.'
|
||||
return
|
||||
|
||||
# Hook up to the debug UI if available.
|
||||
ui = if isNode then null else new UI()
|
||||
silenceNotifications = Params.getBool(query, 'silent', false)
|
||||
|
@ -219,6 +213,12 @@ init = (isNode) ->
|
|||
broker = new Broker brokerUrl
|
||||
snowflake = new Snowflake broker, ui
|
||||
|
||||
cookies = Parse.cookie document.cookie
|
||||
# Do nothing if snowflake has not been opted in.
|
||||
if cookies[COOKIE_NAME] != "1"
|
||||
log 'Not activate. Please click the badge to change options.'
|
||||
return
|
||||
|
||||
log '== snowflake proxy =='
|
||||
log 'Copy-Paste mode detected.' if COPY_PASTE_ENABLED
|
||||
dbg 'Contacting Broker at ' + broker.url if not COPY_PASTE_ENABLED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue