Commit 5212eda6 authored by Arlo Breault's avatar Arlo Breault
Browse files

Fix logging inactive to ui

parent af70d49e
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment