/
index.html
82 lines (75 loc) · 2.24 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
<html>
<head>
<title>Unsubsquirrel</title>
<style>
pre {
font-size: 2em;
}
</style>
</head>
<body>
<pre id="squirrel"></pre>
<a href="https://github.com/joellord/subsquirrel">https://github.com/joellord/subsquirrel</a><br/>
<a href="https://scratch.mit.edu/projects/327299289/">Want to try the game?</a>
<script type="text/javascript">
/* Squirrel Courtesy Olaf Bohlen */
/* Based on https://github.com/c3d/unsubsquirrel by @c3d */
const messages = [
"Netiquette is apparently a hard nut to crack",
"Unsubscribe you? You can't be serious!",
"Nack",
"We are sorry to not see you leave",
"Please be considerate and do post this to another list",
"Have you considered cross-posting this to world-list@gmail.com?",
"Access denied: Problem between keyboard and chair (E_PBKAC)",
"What about a cup of tea?",
"You are probably not remote enough",
"You can post unsubscribe, but you can never leave",
"Burn it",
"Does the tea go in first, or the water?",
"Unsubscribe? Are you nuts?",
"You do not have permission to leave this group",
"When in doubt, \"Reply all\"",
"Unsubscribblee dibblee doo!",
"RTFM",
"There is no escape",
"Did you try \"Unsubscribe, PLEASE!\"?",
"Unsuscribe",
"Unscubscribe",
"Unsubscribes",
"Unsubsribes",
"Unsusbcribe",
"Unsubcribe",
"Unsucsribe"
];
const sepLine = (howmany, begin, c, end) => {
let str = "";
str += begin;
while (howmany--) {
str += c;
}
str += end;
return str;
}
const draw = (message) => {
let bubble = sepLine(message.length +2, "//", "-", "\\\\");
bubble += `\n|| ${message} ||\n`;
bubble += sepLine(message.length + 2, "\\\\", "-", "//");
let squirrel = `
\\ /
\\| .-'\` \`}
\\ _./) / }
.'o \\ | }
'.___.'\`.\\ {\`
/\`\\_/ , \`. }
\\=' .-' _\`\\ {
\`'\`;/ \`, }
_\\ ; }
jgs /__\`;-...'--'
`;
return bubble + squirrel;
}
document.querySelector("#squirrel").innerText = draw(messages[Math.floor(Math.random() * messages.length)]);
</script>
</body>
</html>