-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
121 lines (106 loc) · 3.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<script type="statebus">
bus('window').to_fetch = (key) ->
# Hack: subtracting 10 from the viewport seems to avoid browser scrollbars
_:
width: window.innerWidth - 50
height: window.innerHeight - 20
window.onresize = () ->
bus.dirty 'window'
dom.BODY = ->
localUser = sb['ls/localUser']
if not localUser.name
localUser.name = random_name?() or 'Anonymous ' + random_numbers(4)
sb['/connection'].name = localUser.name
topbar_height = 40
DIV
style:
position: 'relative'
CURSORS()
STATE_DASH()
TOPBAR
height: topbar_height
TAWK
name: localUser.name
space: get_space()
height: sb['window'].height - topbar_height
width: sb['window'].width
dom.TOPBAR = ->
height = @props.height
localUser = sb[ 'ls/localUser']
DIV
style:
marginTop: '10px'
marginLeft: '15px'
marginRight: '15px'
height: "#{height}px"
DIV {},
IMG
src: '/logo.jpg'
alt: 'Tawk Space: The Virtual Salon'
title: 'Tawk Space: The Virtual Salon'
height: height
style:
cursor: 'pointer'
borderRadius: '5px'
onClick: ->
window.location = 'https://tawk.space'
DIV
style:
fontSize: '3vm'
float: 'right'
' My name: '
SPAN
title: 'click to change'
style:
cursor: 'pointer'
INPUT
value: localUser.name
className: 'light-gray'
style:
color: '#282c34'
border: 'transparent'
borderRadius: '5px'
fontWeight: 'bold'
onChange: (e) ->
localUser.name = e.target.value
random_numbers = (length) ->
Math.round((Math.pow(10, length + 1) - Math.random() * Math.pow(10, length)))
.toString(10)
.slice(1)
get_space = ->
window.location.pathname.split('/')[1]
</script>
<head>
<meta charset='utf-8'>
<meta content='Social video chats. Tawk is simple and flexible -- there is no login, and each space can have multiple chat groups.' name="description">
<title>Tawk Space</title>
<script src='https://code.jquery.com/jquery-2.1.4.min.js'></script>
<script src='https://code.jquery.com/ui/1.11.4/jquery-ui.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
<script src='/hark.js'></script>
<style>
html, body {
color: #abb2bf;
background-color: #282c34;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
}
.light-gray { background-color: #D9D9D9 }
.dark-gray { background-color: #BFBFBF }
a, a:link, a:visited, a:hover, a:active {
text-decoration: none;
color: #61afef;
background-color: transparent;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<script src="https://download.agora.io/sdk/web/AgoraRTC_N-4.1.0.js"></script>
<script src="https://stateb.us/client6.js" server="/" globals="false"></script>
<script src="https://invisible-college.github.io/universal-sync/diffsync.js"></script>
<script src="/client/shared.coffee"></script>
<script src="/client/presence.coffee"></script>
<script src="/client/state_dash.coffee"></script>
<script src="/client/tawk.coffee"></script>