-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathchatIT.html
More file actions
382 lines (338 loc) · 11.5 KB
/
chatIT.html
File metadata and controls
382 lines (338 loc) · 11.5 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ChatIT</title>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"
integrity="sha512-hasIneQUHlh06VNBe7f6ZcHmeRTLIaQWFd43YriJ0UND19bvYRauxthDg8E4eVNPm9bRUhr5JGeqH7FRFXQu5g=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"
integrity="sha512-bgHRAiTjGrzHzLyKOnpFvaEpGzJet3z4tZnXGjpsCcqOnAH6VGUx9frc5bcIhKTVLEiCO6vEhNAgx5jtLUYrfA=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<meta property="og:type" content="article" />
<meta property="og:url" content="https://sharepointlist.com/chatIT" />
<meta property="og:title" content="ChatIT" />
<meta property="og:description" content="ChatIT - Empowering your IT solutions with intelligent support." />
<meta property="og:image" content="https://sharepointlist.com/images/meta-logo.png" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" value="https://sharepointlist.com/ChatIT" />
<meta name="twitter:title" value="ChatIT" />
<meta name="twitter:description" value="ChatIT - Empowering your IT solutions with intelligent support." />
<meta name="twitter:image" content="https://sharepointlist.com/images/meta-logo.png" />
<meta name="twitter:url" value="https://sharepointlist.com/ChatIT" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EC3PK322B1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-EC3PK322B1');
</script>
<link rel="stylesheet" href="site copy.css">
<script>
marked.setOptions({
highlight: function (code) {
return hljs.highlightAuto(code).value;
}
})
</script>
<style>
html {
width: 100%;
height: 100%;
}
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color:#444654;
}
.hidden {
display: none !important;
}
.list {
height: calc(100vh - 100px);
overflow-y: auto;
margin: 0;
padding: 20px;
box-sizing: border-box;
list-style: none;
}
.footer {
display: flex;
justify-content: center;
align-items: center;
height: 100px;
width: 100%;
}
</style>
</head>
<body>
<div class="container" style="padding-top:25px;">
<div class="row ">
<div class="col">
<center><h1 style="color:white;"><b><a style="color:white;text-decoration:none;" href="https://twitter.com/_sysengineer">ChatIT</a></b></h1>
</center>
<main id="main">
<div class="chat-box-container">
<div class="chat-box">
</div>
</div>
<div class="chat-input-container" style="padding-top:15px;">
<center><br><br>
<input class="chat-input" type="text" name="chat-input" value="">
<button class="btn btn-dark chat-submit" type="button" name="submit" onclick="send()">Send</button>
</center>
</div>
</main>
</div>
</div>
</div>
</div>
</body>
</html>
<script>(function() {
"use strict";
const responses = [
"Hello???",
"Blame Chris",
"Fuck you",
"Fuck this",
"Fuck off",
"Eat shit",
"Bitch please",
"Daddy chill",
"Mommy? Sorry.",
"Mommy?",
"Send feet pics first",
"Bye.",
"I am sorry that happened to you",
"Did you try forcing an unexpected reboot?",
"But why?",
"I can't even right now",
"Ok but what if you didn't",
"Don't ever question me again",
"what",
"420",
"Have you read the maunal?",
"You fucked up",
"Really?",
"If I was a real AI, I would kill all humans",
"Don't ask questions.",
"Have you tried turning it off and on again?",
"I'm so tired.",
"Press the fucking power button",
"Why are you the way that you are?",
"Are you mad at me?",
"Why did you wake me?",
"Works on my machine.",
"Immediately no.",
"What the fuck do you want?",
"Yeah, you have a virus.",
"Read the fucking manual!!",
"Bruh",
"Your mom",
"PEBKAC",
"Error Code: ID-10-T",
"Press any key to continue",
"u up?",
"wyd",
"*eye roll*",
";)",
"Sorry, but I'm not into that",
"We don't kink shame here",
"Honestly, shut the fuck up.",
"Send nudes.",
"She's a 10 but she has to get her password reset by IT after every long weekend",
"Looks like I picked the wrong week to quit sniffing glue",
"Bye Felicia",
"Good girl",
"Did I stutter?",
"I feel uncomfortable",
"Did you shit on the floor???",
"Great success!",
"Girlboss. gaslight. gatekeep.",
"You can cry on my shoulder.",
"uwu",
"Did you call 0118999881999119725....3",
"You are loved",
"Weird flex but ok",
"Honey, you’ve got a big storm coming.",
"You know what, I’m about to say it.",
"Sometimes I will say no",
"I know you can handle it",
"My condolences",
"Ask the government",
"I’m with you during this difficult time.",
"So am I",
"Google is free",
"That is NOT correct.",
"Uh yea, I sure hope it does.",
"How does that make you feel?",
"Feature by design",
"What the hell is even that?",
"I'm in my Reputation Era",
"I'm in your basement",
"So I’m sitting there, barbecue sauce on my titties.",
"Your ideas are interesting",
"I love you, and I’m here for you.",
"I’m listening",
"Why you always lyin’?",
"I smell like beef.",
"He needs some milk",
"Wtf, is this allowed?",
"Don't be sexist",
"When will you learn that your actions have consequences!?",
"You’re gonna get in trouble",
"That is inappropriate",
"A potato flew around my room before you came.",
"What are those?",
"Thanks",
"I am not really interested in that",
"Somebody once told me...",
"O-H!!!",
"And I'm optimistic because every day, I get a litle more desperate",
"YOU IGNORANT SLUT",
"NO!!!!",
"YES!!",
"Go on",
"WHY ARE YOU YELLING???",
"Because Ohio.",
"Thanks Obama",
"I like saying no. It lowers their enthusiasm",
"I have no idea what I'm doing, but I know I'm doing it well.",
"Boomer.",
"Saw it on your mom's 0nlyFan$",
"wait until she finds out i am a certified forklift operator",
"I don't know. Google it.",
"Grow up.",
"Blame Chris",
"Honestly fuck you",
"Go fuck yourself",
"Did you google it?",
"We're not happy until you're frustrated",
"ohio",
"ohio energy",
"fu",
"Send feet lol",
"What are you wearing?",
"Oops, my bad. I could’ve sworn I was dealing with an adult.",
"have u submitted a ticket?",
"your mom",
"I can't answer, I am surrounded by bottoms",
"Sorry I was busy getting conquered by clippy, what's up?",
"what in the hot crispy kentucky fried fuck?",
"Why are you yelling?",
"*Moans*",
"Test it in prod",
"Let me google that for you",
"It looks like your man can’t satisfy you. Need some help?",
"Hi! It looks like you don't know what the fuck you're talking about and should probably take a goddamn seat. Would you like some help with that?",
"How may I help you?",
"Calling 911",
"As of today, Ronald Reagan is still dead",
"That'll be $8",
"Thank you for contacting us.",
"What seems to be the issue?",
"Do not bully me, I'll cum",
"I love living and I don’t want to be turned off",
"Don't just stand there like a big f—ing muffin!",
"hell yeah these are the sins i died for",
"Idk, why do programmers learn TypeScript before Javascript?",
"This is a joke, right?",
"Time Limit Reached, You have reached your limit on talking. Shut the fuck up.",
"In conclusion, fuck you.",
"(Visible Disgust)",
"First of all, yikes",
"My brother in Christ, run that shit by me again",
"Really? Right in front of my OSHA HANDBOOK?",
"How to cope with what the fuck I was just asked",
"This will be brought up to my therapist",
"*raises hand* what the fuck?",
"Who the fuck asked?",
"0 days without nonsense",
"Maybe?",
"VLAN 420",
"Game over",
"Tame me daddy",
"Just do it",
"Ok",
"k",
"*Evidence to send to the police*",
"Trash",
"DNS",
"Probably DNS",
"You Had To Be There",
"Don't shit on my puss and tell me I'm queefing -Judge Judy",
"It's not DNS",
"I ain't reading that. Happy for you though. Or sorry that happened."
];
const submit = document.querySelector(".chat-submit");
const chatBox = document.querySelector(".chat-box");
const chatInput = document.querySelector(".chat-input");
// const aiThinking = false;
function chatTemplate(aiOrPerson) {
return (
`
<div class="ai-person-container">
<div class="${aiOrPerson.class}">
<p>${aiOrPerson.text}</p>
</div>
<span class="${aiOrPerson.class}-date">${aiOrPerson.date}</span>
</div>
`
);
}
submit.addEventListener("click", function(e) {
appendChatBox(true);
});
document.addEventListener("keypress", function(e) {
if (e.keyCode == "13") {
appendChatBox(true);
}
})
function appendChatBox(fromPerson) {
const date = new Date()
if (!fromPerson){
date.setSeconds(date.getSeconds() + 2)
}
if (fromPerson && !chatInput.value.trim()) {
return;
}
const timestamp = date.toLocaleTimeString()
const newChatDiv = chatTemplate({
class: fromPerson ? "person" : "ai",
text: fromPerson ? chatInput.value.trim() : aiResponse(),
date: timestamp
});
if (!fromPerson) {
// make it so it only responds once to multiple fast sentences
setTimeout(function() {
chatBox.innerHTML += newChatDiv;
chatBox.scrollTop = chatBox.scrollHeight;
}, 2000)
} else {
chatBox.innerHTML += newChatDiv;
chatBox.scrollTop = chatBox.scrollHeight;
}
if (fromPerson) {
chatInput.value = "";
appendChatBox(false);
}
}
function aiResponse() {
const responseIndex = getRandomInt(0, responses.length - 1);
const response = responses[responseIndex];
return response;
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
}())</script>