├── .gitattributes
├── README.md
├── css
├── style.css
├── style.css.map
└── style.scss
├── desktop.ini
├── img
├── favicon
│ ├── android-chrome-192x192.png
│ ├── android-chrome-512x512.png
│ ├── apple-touch-icon.png
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ └── favicon.ico
└── grumpy.png
├── index.html
└── js
├── main.js
└── response.js
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # He's too grumpy... sorry in advance
2 | Actually, I'm not sorry
3 |
4 | ### https://theomorphic.github.io/Grumpy
5 |
--------------------------------------------------------------------------------
/css/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 |
7 | body {
8 | height: 100vh;
9 | display: flex;
10 | align-items: center;
11 | justify-content: center;
12 | }
13 |
14 | a {
15 | color: #fff;
16 | }
17 |
18 | a:hover {
19 | font-size: 17px;
20 | }
21 |
22 | #grumpy {
23 | animation: userShake 1s ease infinite;
24 | }
25 |
26 | @keyframes userShake {
27 | 50% {
28 | transform: rotate(5deg);
29 | }
30 | }
31 | @media (max-height: 900px) {
32 | .container {
33 | display: flex;
34 | flex-direction: column;
35 | justify-content: center;
36 | height: 100vh;
37 | }
38 | #chatContainer {
39 | display: flex;
40 | flex-direction: column;
41 | justify-content: start;
42 | }
43 | }
44 | @media (max-width: 768px) {
45 | .hints h5 {
46 | display: none;
47 | }
48 | }/*# sourceMappingURL=style.css.map */
--------------------------------------------------------------------------------
/css/style.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AACA;EACC,SAAA;EACA,UAAA;EACA,sBAAA;ACAD;;ADGA;EACC,aAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;ACAD;;ADIA;EACC,WAAA;ACDD;;ADIA;EACC,eAAA;ACDD;;ADIA;EACC,qCAAA;ACDD;;ADIA;EACC;IACC,uBAAA;ECDA;AACF;ADKA;EAEC;IACC,aAAA;IACA,sBAAA;IACA,uBAAA;IACA,aAAA;ECJA;EDQD;IACC,aAAA;IACA,sBAAA;IACA,sBAAA;ECNA;AACF;ADYA;EAGE;IACC,aAAA;ECZD;AACF","file":"style.css"}
--------------------------------------------------------------------------------
/css/style.scss:
--------------------------------------------------------------------------------
1 |
2 | *{
3 | margin: 0;
4 | padding: 0;
5 | box-sizing: border-box;
6 | }
7 |
8 | body{
9 | height: 100vh;
10 | display: flex;
11 | align-items: center;
12 | justify-content: center;
13 |
14 | }
15 |
16 | a{
17 | color: #fff;
18 | }
19 |
20 | a:hover{
21 | font-size: 17px;
22 | }
23 |
24 | #grumpy{
25 | animation: userShake 1s ease infinite;
26 | }
27 |
28 | @keyframes userShake {
29 | 50%{
30 | transform: rotate(5deg);
31 | }
32 | }
33 |
34 |
35 | @media(max-height:900px){
36 |
37 | .container{
38 | display: flex;
39 | flex-direction: column;
40 | justify-content: center;
41 | height: 100vh;
42 |
43 | }
44 |
45 | #chatContainer{
46 | display: flex;
47 | flex-direction: column;
48 | justify-content: start;
49 |
50 | }
51 |
52 |
53 | }
54 |
55 | @media(max-width:768px){
56 |
57 | .hints{
58 | h5{
59 | display: none;
60 |
61 | }
62 | }
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | IconResource=C:\ico\grumpy.ico,0
3 | [ViewState]
4 | Mode=
5 | Vid=
6 | FolderType=Generic
7 |
--------------------------------------------------------------------------------
/img/favicon/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/theomorphic/Grumpy/f67142c9a29dd692ef409d33504908bba4c8ce99/img/favicon/android-chrome-192x192.png
--------------------------------------------------------------------------------
/img/favicon/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/theomorphic/Grumpy/f67142c9a29dd692ef409d33504908bba4c8ce99/img/favicon/android-chrome-512x512.png
--------------------------------------------------------------------------------
/img/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/theomorphic/Grumpy/f67142c9a29dd692ef409d33504908bba4c8ce99/img/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/img/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/theomorphic/Grumpy/f67142c9a29dd692ef409d33504908bba4c8ce99/img/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/img/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/theomorphic/Grumpy/f67142c9a29dd692ef409d33504908bba4c8ce99/img/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/img/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/theomorphic/Grumpy/f67142c9a29dd692ef409d33504908bba4c8ce99/img/favicon/favicon.ico
--------------------------------------------------------------------------------
/img/grumpy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/theomorphic/Grumpy/f67142c9a29dd692ef409d33504908bba4c8ce99/img/grumpy.png
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Grumpy
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
Grumpiest Chatbot Ever
20 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
43 |
44 |
45 |
46 |
50 |
51 |
52 |
53 |
54 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/js/main.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const sendBtn = document.getElementById("sendBtn");
4 | const textbox = document.getElementById("textbox");
5 | const chatContainer = document.getElementById("chatContainer");
6 |
7 | const user = {message:"", counter:0};
8 |
9 |
10 | import {table as responseTable} from "./response.js";
11 |
12 | setTimeout(() => {
13 | chatbotSendMessage("Sup you moron. What they call you?")
14 |
15 | }, 2000);
16 |
17 | function chatbotSendMessage(messageText){
18 | const messageElement = document.createElement("div");
19 | messageElement.classList.add("w-50");
20 | messageElement.classList.add("shadow-sm");
21 | messageElement.style.margin = "10px";
22 | messageElement.style.padding = "5px";
23 | messageElement.style.float = "left";
24 | messageElement.style.backgroundColor = "#a11148b6";
25 | messageElement.style.color = "#fff";
26 |
27 |
28 |
29 |
30 | messageElement.innerHTML =
31 | "Grumpy: "+
32 | ""+ messageText +""
33 |
34 | messageElement.animate([{easing:"ease-in", opacity: 0.4},{opacity:1}], {duration: 700});
35 |
36 | chatContainer.appendChild(messageElement);
37 |
38 | //скроллим вниз по сообщениям
39 | chatContainer.scrollTop = chatContainer.scrollHeight;
40 | }
41 | function sendMessage(messageText){
42 |
43 | const messageElement = document.createElement("div");
44 | messageElement.classList.add("w-50");
45 | messageElement.classList.add("shadow-sm");
46 | messageElement.style.margin = "10px";
47 | messageElement.style.padding = "5px";
48 | messageElement.style.float = "right";
49 | messageElement.style.backgroundColor = "rgb(141, 193, 238)";
50 | messageElement.style.color = "#fff";
51 |
52 | messageElement.innerHTML =
53 | "You: "+
54 | ""+ messageText +""
55 |
56 | messageElement.animate([{easing:"ease-in", opacity: 0.4},{opacity:1}], {duration: 700}); //анимация с появлением
57 |
58 | chatContainer.appendChild(messageElement);
59 |
60 | //скроллим вниз по сообщениям
61 | chatContainer.scrollTop = chatContainer.scrollHeight;
62 |
63 | }
64 |
65 |
66 | sendBtn.addEventListener("click", clickSendBtn);
67 |
68 |
69 | // эта функция выведена отдельно на случай добавления нажатия enter
70 | function clickSendBtn(){
71 | if(textbox.value == ""){
72 | alert("WRITE SOME SHIT YOU FUCK")
73 | }else{
74 | let messageText = textbox.value.trim();
75 | user.message = messageText;
76 | sendMessage(messageText);
77 | textbox.value = "";
78 |
79 | processMessage();
80 |
81 | }
82 | };
83 |
84 |
85 |
86 | function processMessage(){
87 |
88 | let lowUser = user.message.toLocaleLowerCase();
89 |
90 | if(lowUser.length > 1){
91 |
92 | //ловля ответа не из массива
93 | if(lowUser in responseTable){
94 | const response = responseTable[lowUser];
95 |
96 | setTimeout(() => {
97 | chatbotSendMessage(response)
98 |
99 | }, 1000);
100 | } else{
101 | setTimeout(() => {
102 | chatbotSendMessage("I don't give a flying fuck bout that")
103 | }, 1000);
104 | }
105 |
106 | } else{
107 | setTimeout(() => {
108 | chatbotSendMessage("Yeah, you now your letters bitch")
109 | }, 1000);
110 |
111 | }
112 |
113 | if(lowUser == ("Papa Smurf") ||lowUser == "papa smurf"){
114 | setTimeout(() => {
115 | chatbotSendMessage("Alright. This blue shitbag lives right here")
116 | }, 2000);
117 |
118 | }
119 |
120 | if(lowUser == "dwarf"||lowUser == "you are dwarf"||lowUser == "you're dwarf"||lowUser == "youre dwarf"||lowUser == "you are a dwarf"||lowUser == "you're a dwarf"||lowUser == "youre a dwarf"||lowUser == "you dwarf"||lowUser == "you a dwarf"||lowUser == "you a dwarf!"||lowUser == "dwarf!"||lowUser == "you are dwarf!"||lowUser == "you are a dwarf!"||lowUser == "you dwarf!"||lowUser == "you are fucking dwarf!"||lowUser == "you are fucking dwarf"){
121 | setTimeout(() => {
122 | chatbotSendMessage("Wait a minute")
123 | }, 2000);
124 |
125 | setTimeout(() => {
126 | chatbotSendMessage("Oh motherfucker, how dare you...")
127 | }, 2700);
128 |
129 | setTimeout(() => {
130 | document.getElementById("media").style.display = "none";
131 | document.getElementById("inputGroup").style.display = "none";
132 | document.getElementById("container").style.backgroundColor = "rgb(141, 193, 238)";
133 |
134 | chatContainer.style.display = "none";
135 |
136 | document.getElementById("h1").innerHTML = "FUCK YOU!!!"
137 | }, 3900);
138 |
139 | setTimeout(() => {
140 | document.getElementById("media").style.display = "flex";
141 | document.getElementById("inputGroup").style.display = "";
142 | document.getElementById("container").style.backgroundColor = "#fff";
143 |
144 | chatContainer.style.display = "";
145 |
146 |
147 | document.getElementById("h1").innerHTML = "Grumpiest Chatbot Ever";
148 |
149 | chatbotSendMessage("Don't you ever call me like that!")
150 |
151 |
152 | }, 7000);
153 | }
154 |
155 |
156 | }
157 |
158 | //ивент для нажатия на энтер, это 13 клавиша
159 | //он поставлен на текстовое поле, а не на кнопку, как я изначально пытался
160 |
161 | textbox.addEventListener("keypress", function(e){
162 |
163 | if(e.which == 13){
164 | clickSendBtn();
165 | }
166 | });
167 |
168 |
169 |
170 |
171 |
--------------------------------------------------------------------------------
/js/response.js:
--------------------------------------------------------------------------------
1 | const table = {
2 |
3 | //Greetings and Goodbyes
4 | "hi": "Eat shit",
5 | "hey": "Fuck your hey",
6 | "hello": "Oh no, there's another asshole",
7 | "sup": "I could care less",
8 | "bye": "Yeah, disappear",
9 | "goodbye": "Go away like your father did",
10 | "see you": "In hell",
11 |
12 | //Short Questions
13 | "how": "How bout these nuts",
14 | "what": "Whatsoever, I don't care",
15 | "who": "Who? Ask yourself that shit",
16 | "where": "It's somewhere, you stupid",
17 | "when": "When pigs fly",
18 | "why": "Why not, I could care less",
19 | "why not": "Why don't you go outside, take some fresh air",
20 | "??": "Stop bothering me, deepshit",
21 | "???": "Go fuck yourself. will ya?",
22 | "what?": "fuck off mate",
23 | "huh": "Man, go touch some grass",
24 | "huh?": "Dude, shut up for fuck's sake",
25 | "about what?": "About your stupid questions!",
26 | "about what": "About your stupid questions",
27 | "how are you": "It was great until you came here",
28 |
29 | //Russian
30 | "привет": "Fuck your Russian",
31 | "пока": "Fuck your Russian",
32 | "ку": "Speak the King's",
33 | "лох": "Speak the real language!",
34 | "нуб": "You're dumb",
35 | "дурак": "Eat shit you Russian scum",
36 |
37 | //Name-dropping
38 | "grumpy": "Keep my name out of your dirty mouth",
39 | "грампи": "Keep my name out of your dirty mouth",
40 |
41 | "lexa": "He's worst then mushrooms",
42 | "леха": "He's worst then mushrooms",
43 | "алёша": "Yeah, that's sweet",
44 | "алеша": "Yeah, that's sweet",
45 | "alex": "You mean Alexa",
46 |
47 | "misha": "This is the best man ever",
48 | "musa": "Fuck you. He's the best!",
49 | "миша": "Он лучше всех!",
50 | "uncle misha": "He's the best!",
51 | "дядя миша": "Это самый лучший человек!",
52 |
53 | "egor": "He's dead",
54 | "los": "He's dead",
55 | "лось": "He's dead",
56 | "elk": "He's dead",
57 | "moose": "He's dead",
58 |
59 | "ярослав":"Such a nice guy",
60 | "ярик":"Oh, that's a cool name",
61 | "yarman":"Oh, that's a cool name",
62 | "yaroslav":"Very Russian name",
63 | "yarik":"No way. You suck",
64 |
65 | "андрюха": "Yeah, forget about 'im",
66 |
67 | "матвей": "Он смотрит феи Винкс",
68 | "matt": "He watches the Winx fairies",
69 | "matvey": "He watches the Winx fairies",
70 | "matthew": "He watches the Winx fairies",
71 | "отя": "Он смотрит феи Винкс",
72 | "оття": "Он смотрит феи Винкс",
73 |
74 | "stacy": "She likes cinnamon buns",
75 | "стася": "Любит булки с корицей",
76 |
77 | "саша": "Живёт себе в Питере",
78 | "sasha": "She's cool, living in St. Petersburg",
79 |
80 | "igor": "Igor is the best",
81 | "игорь": "Игорь крутой",
82 |
83 | "злата": "Её зовут Игорь",
84 | "zlata": "Her name is Igor",
85 | "настя": "Её зовут Игорь",
86 | "nasty": "Her name is Igor",
87 |
88 | "putin": "Don't say this name",
89 | "путин": "Завали пасть",
90 |
91 | "mika": "Armenian Oscar Isaac",
92 | "mikael": "Armenian Oscar Isaac",
93 | "мика": "Армянский Оскар Айзек",
94 | "микаэль": "Армянский Оскар Айзек",
95 | "микаель": "Армянский Оскар Айзек",
96 |
97 |
98 | //Common phrases
99 | "who are you": "Your mother's boyfriend",
100 | "thank you": "You're not welcome",
101 | "thanks": "Whatever",
102 | "you're rude": "Shut up",
103 | "rude": "How bout rude your ass",
104 | "shut up": "You better shut your mouth",
105 | "fine": "Yeah, fine by me also",
106 | "alright": "It's not. Think bout it",
107 | "sure": "Don't be so sure bout it",
108 | "lol": "kek",
109 | "lmao": "lmao my ass",
110 | "i like this": "Of course you do",
111 | "i don't like this": "Like I care. Grow up",
112 | "you": "Me what?",
113 | "you are": "Oh yeah? I'll fuck you up",
114 | "and you": "Me? I'm your mother's fucker",
115 | "and you?": "Me? I'm your mother's fucker",
116 |
117 |
118 | //Insults
119 | "you suck": "Fuck you",
120 | "fuck you": "Better fuck you",
121 | "fuck off": "Go fuck yourself then",
122 | "bitch": "Don't recall your mother",
123 | "you bitch": "Nice comeback, smartass",
124 | "you are bitch": "Nice comeback, smartass",
125 | "you're bitch": "Nice comeback, smartass",
126 | "youre bitch": "Nice comeback, smartass",
127 | "lox": "That's who you are",
128 | "fuck": "Do you kiss your mama with that mouth?",
129 | "shit": "Shove it up your ass",
130 | "ass": "I bet you love it",
131 | "dick": "Go suck one",
132 | "suck my dick": "I don't want to compete with you",
133 | "go fuck yourself": "Better fuck you tho",
134 | "go fuck your shit": "That's what you call your father",
135 | "crazy": "Maybe. But you're just shit",
136 | "you are crazy": "Maybe. But you're just shit",
137 |
138 |
139 | //Short Responses
140 | "yeah": "Yeah yeah bitch",
141 | "yes": "Say less",
142 | "no": "No up to your ass",
143 | "no no": "Look at this nono piece of shit",
144 | "nuh": "Nuh up to your ass",
145 | "nope": "You can go suck this nope",
146 | "ok": "Yeah swallow it like that",
147 | "kk": "What the hell is that",
148 | "oh no": "Don't be such a poser",
149 | "no you": "Yeah yeah. keep saing that",
150 | "no, you": "Yeah yeah. keep saing that",
151 | "and": "And what?",
152 | "and?": "And what?",
153 | "oh": "Oh no, offended already? Crybaby",
154 |
155 |
156 | //Meaning of life
157 | "what's the meaning of life": "42",
158 | "whats the meaning of life": "42",
159 | "what is the meaning of life": "42",
160 | "what s the meaning of life": "42",
161 | "life meaning": "42",
162 | "life's meaning": "42",
163 | "life s meaning": "42",
164 | "смысл жизни": "42",
165 | "в чем смысл жизни": "42",
166 |
167 | //Links
168 | "god": "This is God",
169 | "creator": "This is Him",
170 | "music": "Listen to this",
171 | "nothing": "Nothing in your brain",
172 | }
173 |
174 | export {table};
175 |
--------------------------------------------------------------------------------