mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Begin embeddable snowflake badge (issue #16)
This commit is contained in:
parent
a915758275
commit
7677707249
4 changed files with 55 additions and 11 deletions
|
@ -232,19 +232,22 @@ log = (msg) -> # Log to the message window.
|
|||
|
||||
# Status bar
|
||||
Status =
|
||||
set: (msg) -> $status.innerHTML = 'Status: ' + msg
|
||||
set: (msg) ->
|
||||
$status.innerHTML = 'Status: ' + msg if $status
|
||||
|
||||
init = ->
|
||||
$status = document.getElementById('status')
|
||||
$msglog = document.getElementById('msglog')
|
||||
$msglog.value = ''
|
||||
$badge = document.getElementById('badge')
|
||||
if !badge
|
||||
$status = document.getElementById('status')
|
||||
$msglog = document.getElementById('msglog')
|
||||
$msglog.value = ''
|
||||
|
||||
$send = document.getElementById('send')
|
||||
$send.onclick = Interface.acceptInput
|
||||
$send = document.getElementById('send')
|
||||
$send.onclick = Interface.acceptInput
|
||||
|
||||
$input = document.getElementById('input')
|
||||
$input.focus()
|
||||
$input.onkeydown = (e) -> $send.onclick() if 13 == e.keyCode # enter
|
||||
$input = document.getElementById('input')
|
||||
$input.focus()
|
||||
$input.onkeydown = (e) -> $send.onclick() if 13 == e.keyCode # enter
|
||||
|
||||
log '== snowflake browser proxy =='
|
||||
log 'Copy-Paste mode detected.' if COPY_PASTE_ENABLED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue