-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidechat.html
More file actions
147 lines (131 loc) · 3.08 KB
/
sidechat.html
File metadata and controls
147 lines (131 loc) · 3.08 KB
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html>
<head>
<style>
:root {
color-scheme: dark;
--bg: #1f1f1f;
--panel: #262626;
--field-border: #3a3a3a;
--text: #f4f4f4;
--muted: #a7a7a7;
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
background: var(--bg);
color: var(--text);
font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
display: flex;
flex-direction: column;
}
header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
padding: 10px;
border-bottom: 1px solid var(--field-border);
background: var(--panel);
}
h1 {
margin: 0;
font-size: 14px;
font-weight: 650;
letter-spacing: 0;
}
.header-actions {
display: flex;
align-items: center;
gap: 8px;
}
button,
a {
padding: 7px 10px;
border: 0;
border-radius: 8px;
background: #fff;
color: #111;
cursor: pointer;
font: inherit;
font-size: 12px;
font-weight: 650;
text-decoration: none;
white-space: nowrap;
}
.icon-button {
display: grid;
place-items: center;
width: 30px;
height: 30px;
padding: 0;
}
.icon-button svg {
width: 16px;
height: 16px;
}
.frame-wrap {
position: relative;
flex: 1 1 auto;
min-height: 0;
}
iframe {
display: block;
width: 100%;
height: 100%;
border: 0;
background: #fff;
}
.empty,
.status {
display: grid;
gap: 12px;
align-content: center;
min-height: 100%;
padding: 18px;
color: var(--muted);
font-size: 13px;
line-height: 1.4;
text-align: center;
}
.status {
min-height: auto;
padding: 10px;
border-bottom: 1px solid var(--field-border);
background: #2b2b2b;
text-align: left;
overflow-wrap: anywhere;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<header>
<h1>Sidechat</h1>
<div class="header-actions">
<button id="reloadFrame" class="icon-button" type="button" aria-label="Reload Sidechat" title="Reload Sidechat">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M20 6v5h-5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M19 13a7 7 0 1 1-2-5l3 3" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
<a id="openTab" href="https://chatgpt.com/" target="_blank" rel="noreferrer">Open tab</a>
</div>
</header>
<div class="frame-wrap">
<div id="status" class="status hidden"></div>
<div id="empty" class="empty">Use a Sidechat preset from the right-click menu.</div>
<iframe id="chatFrame" class="hidden" title="Sidechat"></iframe>
</div>
<script src="sidechat.js"></script>
</body>
</html>