- スキャンID:
- 4aba0a2f-3578-4606-8404-216a32466e54終了
- 送信済みURL:
- https://deer.meltland.dev/
- レポート終了日:
リンク · 2件検出
ページから特定された発信リンク
リンク | テキスト |
---|---|
https://status.uptime-monitor.io/675625ba72974e1ee251f1f3 | Check the meltland status page |
https://i.ibb.co/v4HtjPJ/IMG-0960.jpg | Attachment 1 (https://i.ibb.co/v4HtjPJ/IMG-0960.jpg) |
JavaScript変数 · 35件検出
ページのウィンドウオブジェクトにロードされたグローバルのJavaScript変数は関数以外の場所で宣言された変数で、現在のスコープ内であればコードのどこからでもアクセス可能です
名前 | 規模 |
---|---|
0 | object |
1 | object |
onbeforetoggle | object |
documentPictureInPicture | object |
onscrollend | object |
displayError | function |
closePopup | function |
stgsTriggers | function |
updateStg | function |
uploadFile | function |
コンソールログメッセージ · 52件検出
Webコンソールにログ記録されたメッセージ
規模 | 分類 | ログ |
---|---|---|
verbose | dom |
|
log | javascript |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
log | other |
|
HTML
未加工のHTMLページ本文
<!DOCTYPE html><html lang="en-US"><head>
<title>BossDeer</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
body {
font-family: 'Noto Sans', sans-serif;
margin: 0px;
background-color: #2e2d2b;
color: #ede4d5;
color-scheme: dark;
}
button {
background-color: #4d4a45;
color: #ede4d5;
border: none;
border-radius: 4px;
padding: 8px;
font-family: 'Noto Sans', sans-serif;
margin-bottom: 4px;
}
button:hover {
background-color: #403d39;
cursor: pointer;
}
input {
background-color: #403d39;
color: #ede4d5;
border: none;
border-radius: 4px;
padding: 8px;
font-family: 'Noto Sans', sans-serif;
margin-bottom: 4px;
}
.scene {
margin: 8px;
}
#error-bar {
background-color: #f2b149;
color: #2e2d2b;
width: 100%;
padding: 4px;
box-sizing: border-box;
}
.text-clickable {
text-decoration: underline;
cursor: pointer;
}
.clickable {
cursor: pointer;
}
.hidden {
display: none;
}
.post {
background-color: #403d39;
padding: 6px;
border-radius: 4px;
margin-bottom: 8px;
word-break: break-word;
overflow-wrap: break-word;
box-sizing: border-box;
width: 100%;
}
.mono {
font-family: monospace;
}
#ms-msg {
width:60vw;
box-sizing: border-box;
}
#ms-button-post {
box-sizing: border-box;
}
.pfp {
border-radius: 100%;
width: 36px;
height: 36px;
float: left;
margin-right: 8px;
margin-top: 2px;
border: 2px #383531 solid;
}
.album-cover {
border-radius: 4px;
width: 62px;
height: 62px;
float: left;
margin-right: 8px;
margin-top: 1px;
border: 2px #383531 solid;
}
#ud-lastfm-container {
width: 100%;
background-color: #403d39;
padding: 6px;
border-radius: 4px;
margin-top: 8px;
word-break: break-word;
overflow-wrap: break-word;
box-sizing: border-box;
}
#ud-bio-container {
width: 100%;
background-color: #403d39;
padding: 6px;
border-radius: 4px;
margin-top: 8px;
word-break: break-word;
overflow-wrap: break-word;
box-sizing: border-box;
}
a {
color: #ede4d5;
}
.attachment {
margin-left:4px;
margin-right:4px;
max-height:25vw;
max-width:25vw;
width:auto;
height:auto;
}
.rl-guidelines {
background-color: #999085;
color: black;
border: none;
border-radius: 4px;
padding: 8px;
font-family: serif;
margin: 4px;
width: 90vw;
}
.reply {
color: #c2baac;
font-style: italic;
}
</style>
</head>
<body>
<div id="error-bar" class="hidden"><span onclick="closePopup();" class="text-clickable">Close</span> - <span id="error-text">Connecting...<span></span></span></div>
<div class="scene">
<div id="loading" class="hidden"><center>Taking too long to load? Try <span onclick="logOut();" class="text-clickable">a full reset</span>.</center></div>
<div id="connection-lost" class="hidden"><center>Connection was lost.<br><span onclick="window.location.reload();" class="text-clickable">Reload</span>.<br><br><small><a href="https://status.uptime-monitor.io/675625ba72974e1ee251f1f3">Check the meltland status page</a>.</small></center></div>
<div id="register-login" class=""><center>
<input id="rl-username" placeholder="Username..." type="text" maxlength="20"><br>
<input id="rl-password" placeholder="Password..." type="password"><br>
<input id="rl-invitecode" placeholder="Invite code..." type="text" maxlength="16"><br>
<button onclick="logIn();">Log in</button>
<button onclick="register();">Register</button><br><br>
<small>(You only need to provide an invite code when registering.)<br>(Please ensure you have read the <a href="GUIDELINES.txt">GUIDELINES</a> (also provided below) before creating an account.)</small><br>
<embed class="rl-guidelines" type="text/plain" src="GUIDELINES.txt"><br>
<small id="rl-version">1.4.1b - SOKTDEER-2024.12.01-15.11</small>
</center></div>
<div id="main-scene" class="hidden">
<button id="ms-name" onclick="showUser(username);">@...</button> | <button onclick="switchScene('main-config');">Settings</button> <button onclick="switchScene('main-inbox');" id="ms-button-inbox">Inbox</button> <button id="ms-button-mod" class="hidden" onclick="switchScene('main-moderation');">Moderation</button><br>
<small id="ms-ulist">5 users online (<span class="clickable" onclick="showUser('h');">h</span>, <span class="clickable" onclick="showUser(':3');">:3</span>, <span class="clickable" onclick="showUser('noodles');">noodles</span>, <span class="clickable" onclick="showUser('bot');">bot</span>, <span class="clickable" onclick="showUser('mybearworld');">mybearworld</span>)</small><br><br><center>
<button onclick="addAttachment();">URL...</button> <button onclick="addUpload();">+</button> <input id="ms-msg" maxlength="2000" oninput="textinput();" autocomplete="off" onkeydown="if (event.keyCode == 13) {sendPost();}" placeholder="What's on your mind?" type="text"> <button id="ms-button-post" onclick="sendPost();">Post</button><br><small id="ms-details"></small></center><br>
<div id="ms-posts"><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 11:17:30 PM - <span class="text-clickable" onclick="reply(17342182497769412);">Reply</span></small><br><span>which is strange</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 11:17:28 PM - <span class="text-clickable" onclick="reply(17342182476063768);">Reply</span></small><br><span>and then she decided that that was a good idea and kept it deleted</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 11:17:18 PM - <span class="text-clickable" onclick="reply(17342182383252582);">Reply</span></small><br><span>friend of han deleted it as a joke i think</span></div><div class="post"><img src="https://i.ibb.co/KX6vYw8/9s8y4-Hs-Iw-TTq1-El-YSi-Up-WKTa.webp" onerror="this.src = 'default.jpeg';" onclick="showUser("engineerrunner");" class="clickable pfp"><span onclick="showUser("engineerrunner");" class="clickable"><b>emergency fro🅱️er</b> (<span class="mono">@engineerrunner</span>)</span><br><small>12/14/2024, 11:16:33 PM - <span class="text-clickable" onclick="reply(17342181932889726);">Reply</span></small><br><span>wait did le forum helpers on srtahct get deleted</span></div><div class="post"><img src="https://i.ibb.co/KX6vYw8/9s8y4-Hs-Iw-TTq1-El-YSi-Up-WKTa.webp" onerror="this.src = 'default.jpeg';" onclick="showUser("engineerrunner");" class="clickable pfp"><span onclick="showUser("engineerrunner");" class="clickable"><b>emergency fro🅱️er</b> (<span class="mono">@engineerrunner</span>)</span><br><small>12/14/2024, 11:03:25 PM - <span class="text-clickable" onclick="reply(17342174049357168);">Reply</span></small><br><span>lamp oil, ropes, bombs. you want it? it's yours, my friend, as long as you have enough rupees</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 10:54:48 PM - <span class="text-clickable" onclick="reply(17342168883636256);">Reply</span></small><br><span class="reply">→ noodle (@noodles): /ask </span><hr><span>yeah who i wanna know</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 10:54:48 PM - <span class="text-clickable" onclick="reply(17342168882793214);">Reply</span></small><br><span>/ask </span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 10:49:07 PM - <span class="text-clickable" onclick="reply(17342165468522478);">Reply</span></small><br><span class="reply">→ mybearworld (@mybearworld): /ask you made a liter of _orange juice_, alright? not clouds.</span><hr><span>ah today is such a beautiful- *rain*</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 10:49:07 PM - <span class="text-clickable" onclick="reply(17342165466593230);">Reply</span></small><br><span>/ask you made a liter of _orange juice_, alright? not clouds.</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 10:44:43 PM - <span class="text-clickable" onclick="reply(17342162833513856);">Reply</span></small><br><span class="reply">→ noodle (@noodles): /ask no you did not make clouds</span><hr><span>wow its a liter</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 10:44:43 PM - <span class="text-clickable" onclick="reply(17342162832551370);">Reply</span></small><br><span>/ask no you did not make clouds</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 10:38:15 PM - <span class="text-clickable" onclick="reply(17342158947357176);">Reply</span></small><br><span>NO</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 10:38:07 PM - <span class="text-clickable" onclick="reply(17342158870640480);">Reply</span></small><br><span class="reply">→ mybearworld (@mybearworld): /ask what happens when you are a stock image and you throw a safe at a blender</span><hr><span>i made clouds</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 10:38:07 PM - <span class="text-clickable" onclick="reply(17342158868513174);">Reply</span></small><br><span>/ask what happens when you are a stock image and you throw a safe at a blender</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 10:27:23 PM - <span class="text-clickable" onclick="reply(17342152429169682);">Reply</span></small><br><span>me when i am a stock image and i throw a safe at a blender</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 10:07:56 PM - <span class="text-clickable" onclick="reply(17342140764241612);">Reply</span></small><br><span>no thanks i do not want to eat A Goofy Movie (1995 film)</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 10:07:40 PM - <span class="text-clickable" onclick="reply(17342140600810190);">Reply</span></small><br><span class="reply">→ noodle (@noodles): /ask what else is on the menu</span><hr><span>something goofy</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 10:07:40 PM - <span class="text-clickable" onclick="reply(17342140599928882);">Reply</span></small><br><span>/ask what else is on the menu</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 10:07:18 PM - <span class="text-clickable" onclick="reply(17342140377930446);">Reply</span></small><br><span>no thanks i dont want to eat those</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 10:07:10 PM - <span class="text-clickable" onclick="reply(17342140295443682);">Reply</span></small><br><span class="reply">→ noodle (@noodles): /ask im hungry</span><hr><span>the bugs are fireproof</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 10:07:09 PM - <span class="text-clickable" onclick="reply(17342140294629178);">Reply</span></small><br><span>/ask im hungry</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 10:04:33 PM - <span class="text-clickable" onclick="reply(17342138726185986);">Reply</span></small><br><span class="reply">→ stripes (@:3): what if math.random was a getter</span><hr><span>that. is cursed</span></div><div class="post"><img src="https://files.catbox.moe/h5klyw.webp" onerror="this.src = 'default.jpeg';" onclick="showUser(":3");" class="clickable pfp"><span onclick="showUser(":3");" class="clickable"><b>stripes</b> (<span class="mono">@:3</span>)</span><br><small>12/14/2024, 10:01:23 PM - <span class="text-clickable" onclick="reply(17342136831665806);">Reply</span></small><br><span>what if math.random was a getter</span></div><div class="post"><img src="https://files.catbox.moe/1gpgi8.png" onerror="this.src = 'default.jpeg';" onclick="showUser("pix");" class="clickable pfp"><span onclick="showUser("pix");" class="clickable"><b>Pix</b> (<span class="mono">@pix</span>)</span><br><small>12/14/2024, 9:57:44 PM - <span class="text-clickable" onclick="reply(17342134644021966);">Reply</span></small><br><span>Be back soon</span></div><div class="post"><img src="https://files.catbox.moe/1gpgi8.png" onerror="this.src = 'default.jpeg';" onclick="showUser("pix");" class="clickable pfp"><span onclick="showUser("pix");" class="clickable"><b>Pix</b> (<span class="mono">@pix</span>)</span><br><small>12/14/2024, 9:56:07 PM - <span class="text-clickable" onclick="reply(17342133669446456);">Reply</span></small><br><span>Also I’m gonna make a piece that releases on my bday</span></div><div class="post"><img src="https://files.catbox.moe/1gpgi8.png" onerror="this.src = 'default.jpeg';" onclick="showUser("pix");" class="clickable pfp"><span onclick="showUser("pix");" class="clickable"><b>Pix</b> (<span class="mono">@pix</span>)</span><br><small>12/14/2024, 9:55:51 PM - <span class="text-clickable" onclick="reply(17342133512942204);">Reply</span></small><br><span>After zim</span></div><div class="post"><img src="https://files.catbox.moe/1gpgi8.png" onerror="this.src = 'default.jpeg';" onclick="showUser("pix");" class="clickable pfp"><span onclick="showUser("pix");" class="clickable"><b>Pix</b> (<span class="mono">@pix</span>)</span><br><small>12/14/2024, 9:55:46 PM - <span class="text-clickable" onclick="reply(17342133460142428);">Reply</span></small><br><span class="reply">→ noodle (@noodles): what if yuor did a pixel art of one of my pce ctas</span><hr><span>I can’t really draw animals but I can try</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 9:55:25 PM - <span class="text-clickable" onclick="reply(17342133248933646);">Reply</span></small><br><span>jade</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 9:55:22 PM - <span class="text-clickable" onclick="reply(17342133219330140);">Reply</span></small><br><span class="reply">→ noodle (@noodles): /pce</span><hr><span>Selected cat: Jade<br>https://www.pixelcatsend.com/cat&id=313360</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 9:55:22 PM - <span class="text-clickable" onclick="reply(17342133218438814);">Reply</span></small><br><span>/pce</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 9:55:20 PM - <span class="text-clickable" onclick="reply(17342133195785090);">Reply</span></small><br><span>i dont know which one to pick so lets leave it up to bot</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 9:55:18 PM - <span class="text-clickable" onclick="reply(17342133180603858);">Reply</span></small><br><span>wait does this mean i can't trust what /8ball says</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 9:55:11 PM - <span class="text-clickable" onclick="reply(17342133111016338);">Reply</span></small><br><span>oh</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 9:55:08 PM - <span class="text-clickable" onclick="reply(17342133081122484);">Reply</span></small><br><span class="reply">→ mybearworld (@mybearworld): /8ball is it possible</span><hr><span>nope</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 9:55:08 PM - <span class="text-clickable" onclick="reply(17342133079799442);">Reply</span></small><br><span>/8ball is it possible</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 9:55:08 PM - <span class="text-clickable" onclick="reply(17342133077182130);">Reply</span></small><br><span class="reply">→ Pix (@pix): Gonna do some pixel art what should I draw. I’m thinking Zim</span><hr><span>what if yuor did a pixel art of one of my pce ctas</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 9:55:04 PM - <span class="text-clickable" onclick="reply(17342133035334766);">Reply</span></small><br><span>alright then</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 9:55:02 PM - <span class="text-clickable" onclick="reply(17342133018582942);">Reply</span></small><br><span>uhm</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 9:54:59 PM - <span class="text-clickable" onclick="reply(17342132991141624);">Reply</span></small><br><span class="reply">→ mybearworld (@mybearworld): /8ball is it possible</span><hr><span>try again</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 9:54:59 PM - <span class="text-clickable" onclick="reply(17342132988400500);">Reply</span></small><br><span class="reply">→ Pix (@pix): That’s impossible</span><hr><span>/8ball is it possible</span></div><div class="post"><img src="https://files.catbox.moe/1gpgi8.png" onerror="this.src = 'default.jpeg';" onclick="showUser("pix");" class="clickable pfp"><span onclick="showUser("pix");" class="clickable"><b>Pix</b> (<span class="mono">@pix</span>)</span><br><small>12/14/2024, 9:54:35 PM - <span class="text-clickable" onclick="reply(17342132752394680);">Reply</span></small><br><span>Gonna do some pixel art what should I draw. I’m thinking Zim</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 9:54:35 PM - <span class="text-clickable" onclick="reply(17342132749612318);">Reply</span></small><br><span class="reply">→ noodle (@noodles): /ask do you like dorites</span><hr><span>oh look<br>a door<br>i wonder<br>what's inside</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 9:54:35 PM - <span class="text-clickable" onclick="reply(17342132746928224);">Reply</span></small><br><span>/ask do you like dorites</span></div><div class="post"><img src="https://files.catbox.moe/1gpgi8.png" onerror="this.src = 'default.jpeg';" onclick="showUser("pix");" class="clickable pfp"><span onclick="showUser("pix");" class="clickable"><b>Pix</b> (<span class="mono">@pix</span>)</span><br><small>12/14/2024, 9:53:53 PM - <span class="text-clickable" onclick="reply(17342132325366056);">Reply</span></small><br><span></span><hr><span><a target="_blank" rel="noopener noreferrer" href="https://i.ibb.co/v4HtjPJ/IMG-0960.jpg">Attachment 1 (https://i.ibb.co/v4HtjPJ/IMG-0960.jpg)</a><br></span><img src="https://i.ibb.co/v4HtjPJ/IMG-0960.jpg" class="attachment" onerror="this.remove();"></div><div class="post"><img src="https://files.catbox.moe/1gpgi8.png" onerror="this.src = 'default.jpeg';" onclick="showUser("pix");" class="clickable pfp"><span onclick="showUser("pix");" class="clickable"><b>Pix</b> (<span class="mono">@pix</span>)</span><br><small>12/14/2024, 9:53:36 PM - <span class="text-clickable" onclick="reply(17342132162451482);">Reply</span></small><br><span class="reply">→ noodle (@noodles): mbw is trying to make sense of what bot is saying</span><hr><span>That’s impossible</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 9:53:28 PM - <span class="text-clickable" onclick="reply(17342132081397738);">Reply</span></small><br><span>that's not at all helpful</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 9:53:21 PM - <span class="text-clickable" onclick="reply(17342132012177832);">Reply</span></small><br><span class="reply">→ mybearworld (@mybearworld): /ask is what you're saying actually a genuine response to the questions you are being asked, or is it all just pretending?</span><hr><span>jerry's bait shop, you know the place</span></div><div class="post"><img src="https://i.ibb.co/n0m42sH/main.png" onerror="this.src = 'default.jpeg';" onclick="showUser("mybearworld");" class="clickable pfp"><span onclick="showUser("mybearworld");" class="clickable"><b>mybearworld</b> (<span class="mono">@mybearworld</span>)</span><br><small>12/14/2024, 9:53:21 PM - <span class="text-clickable" onclick="reply(17342132009771330);">Reply</span></small><br><span>/ask is what you're saying actually a genuine response to the questions you are being asked, or is it all just pretending?</span></div><div class="post"><img src="https://i.ibb.co/gFQPHL3/wink.jpg" onerror="this.src = 'default.jpeg';" onclick="showUser("noodles");" class="clickable pfp"><span onclick="showUser("noodles");" class="clickable"><b>noodle</b> (<span class="mono">@noodles</span>)</span><br><small>12/14/2024, 9:52:28 PM - <span class="text-clickable" onclick="reply(17342131476316792);">Reply</span></small><br><span>true</span></div><div class="post"><img src="https://files.catbox.moe/tzbigd.png" onerror="this.src = 'default.jpeg';" onclick="showUser("bot");" class="clickable pfp"><span onclick="showUser("bot");" class="clickable"><b>bot prefix is slash</b> (<span class="mono">@bot</span>) <span class="mono">BOT</span></span><br><small>12/14/2024, 9:52:24 PM - <span class="text-clickable" onclick="reply(17342131442734590);">Reply</span></small><br><span class="reply">→ noodle (@noodles): /ask miau</span><hr><span>AAAAAAAALBUQUERQUE!!1</span></div></div>
<input class="hidden" id="ms-attach" onchange="attachFile();" multiple="true" type="file">
</div>
<div id="main-config" class="hidden">
<button onclick="switchScene('main-scene');">Return to Home</button><br>
<h2>Profile</h2>
<input id="mc-display-name" placeholder="Display name..." type="text" maxlength="20"> <button onclick="setDisplayName();">Set display name</button><br>
<input id="mc-avatar" placeholder="Avatar URL..." type="text" maxlength="656"> <button onclick="setAvatar();">Set avatar URL</button><br>
<input id="mc-bio" placeholder="Bio..." type="text" maxlength="512"> <button onclick="setBio();">Set bio</button><br>
<input id="mc-lastfm" placeholder="Last.fm..." type="text" maxlength="72"> <button onclick="setLastfm();">Set last.fm</button>
<h2>Misc</h2>
<input id="mc-imgbb-key" placeholder="ImgBB key..." type="text" maxlength="128"> <button onclick="updateStg('imgbb_key');">Set ImgBB key</button><br>
<button id="mc-button-replace" onclick="updateStg('replace_text')">(enabled) Replace text</button><br><br>
<button onclick="logOut();">Log out</button><br>
<small id="mc-version">1.4.1b - SOKTDEER-2024.12.01-15.11</small>
</div>
<div id="main-inbox" class="hidden">
<button onclick="switchScene('main-scene');">Return to Home</button><br>
<h2>Inbox</h2>
<div id="mi-posts"></div>
</div>
<div id="main-moderation" class="hidden">
<button onclick="switchScene('main-scene');">Return to Home</button><br>
<h2>Ban</h2>
<input id="mm-username-ban" placeholder="Username..." type="text"><br>
<input id="mm-until-ban" type="datetime-local"><br>
<input id="mm-reason-ban" placeholder="Reason..." type="text"><br>
<button onclick="ban();">Ban User</button>
<h2>Invite code</h2>
<span id="mm-invite-code"></span><br>
<button onclick="genInviteCode();">Generate invite code</button><br>
<button onclick="resetInvites();">Reset invite codes</button>
<h2>Clear home</h2>
<button onclick="clearHome();">Clear home</button>
<h2>Forcekick</h2>
<input id="mm-username-forcekick" placeholder="Username..." type="text"><br>
<button onclick="forceKick();">Forcekick</button>
<h2>Inbox</h2>
<input id="mm-content-inbox" placeholder="Message..." type="text" width="80"><br>
<button onclick="postInbox();">Post inbox</button>
</div>
<div id="user-display" class="hidden">
<button onclick="switchScene('main-scene');">Return to Home</button><br>
<img id="ud-avatar" class="pfp" src="default.jpeg" onerror="this.src = 'default.jpeg'">
<span id="ud-display-name"></span><br>
<span id="ud-username" class="mono"></span><br>
<small id="ud-created"></small><br>
<small id="ud-permissions"></small> <!-- no br here!! -->
<small id="ud-special"></small><br>
<span id="ud-banned" class="hidden"><small id="ud-banned-span"></small><br></span>
<div id="ud-bio-container"><b>Bio</b><br><span id="ud-bio">This user does not have a bio.</span></div>
<div id="ud-lastfm-container">
<img id="ud-lastfm-cover" class="album-cover" src="default.jpeg" onerror="this.src = 'default.jpeg'">
<span id="ud-lastfm-name"></span><br>
<span id="ud-lastfm-artist"></span><br>
<small id="ud-lastfm-album"></small>
</div>
</div>
</div>
<script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'8f21fd39aeb22154',t:'MTczNDIxOTEwNC4wMDAwMDA='};var a=document.createElement('script');a.nonce='';a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script><iframe height="1" width="1" style="position: absolute; top: 0px; left: 0px; border: none; visibility: hidden;"></iframe>
<script>
// hello guys gals and gays!
// keep in mind that unlike rome, this was infact built in a day*
// so please dont judge so much!
// let us commence and define the lame shit here
document.getElementById("rl-username").value = "";
document.getElementById("rl-password").value = "";
document.getElementById("rl-invitecode").value = "";
function displayError (errText) {
document.getElementById("error-text").innerText = errText;
document.getElementById("error-bar").classList.remove("hidden");
};
function closePopup () {
document.getElementById("error-bar").classList.add("hidden");
};
const version = "1.4.1b"; // this version number is my arch nemesis
const serverVersion = "SOKTDEER-2024.12.01-15.11";
let last_cmd = "";
let username = "";
let logged_in = false;
let scene = "loading";
let ulist = [];
let posts = [];
let replies = [];
let attachments = [];
let replace_text = false;
let text_replacements = {
"\\n": "\n",
":x:": "❌",
":+1:": "👍",
":-1:": "👎",
":check:": "✅",
":b:": "🅱️"
};
const settings_template = {"replace_text": true, "imgbb_key": ""}
if (localStorage.getItem("settings") == null) {
localStorage.setItem("settings", JSON.stringify(settings_template))
};
if (localStorage.getItem("last_inbox_id") == null) {
localStorage.setItem("last_inbox_id", 0)
};
let settings = JSON.parse(localStorage.getItem("settings"));
// new field thingy automaticinator #PurgecoreForever
for (const i in settings_template) {
if (!i in settings) {
settings[i] = settings_template[i]
localStorage.setItem("settings", JSON.stringify(settings))
}
}
function stgsTriggers() {
if (settings.replace_text) {
replace_text = true;
document.getElementById("mc-button-replace").innerText = "(enabled) Replace text";
} else {
replace_text = false;
document.getElementById("mc-button-replace").innerText = "(disabled) Replace text";
};
};
function updateStg(setting) {
if (setting == "replace_text") {
if (settings.replace_text) {
settings.replace_text = false;
} else {
settings.replace_text = true;
};
} else if (setting == "imgbb_key") {
settings.imgbb_key = document.getElementById("mc-imgbb-key").value;
document.getElementById("mc-imgbb-key").value = "";
};
localStorage.setItem("settings", JSON.stringify(settings));
stgsTriggers();
};
stgsTriggers();
async function uploadFile(file) {
// ORIGINAL CREDIT TO:
// @:3 on SoktDeer
// @ArrowAced on GitHub
// https://gist.github.com/ArrowAced/7d342a06cc8325f272cd42d6442f6466
// note: very much so modified since then, mainly because i need to use imgbb because cors sucks
const data = new FormData();
data.set('key', settings.imgbb_key);
data.set('image', file);
//data.set('userhash', env.catbox); // user hash is optional
const init = {
method: 'POST',
//headers: {
//'User-Agent': "BossDeer"
//},
body: data
};
const res = await fetch("https://api.imgbb.com/1/upload", init);
const rsp = await res.json()
if ("data" in rsp && "image" in rsp.data && "url" in rsp.data.image) {
if (rsp.data.image.url.startsWith('https://i.ibb.co/')) {
return rsp.data.image.url;
} else {
throw new Error(rsp);
};
} else {
throw new Error(rsp);
};
};
// whatever, go my ws shit
const ws = new WebSocket("wss://sokt.meltland.dev") // i hate const!! grr!! >:(
ws.onmessage = function (event) {
let incoming = JSON.parse(event.data);
console.log(incoming);
if (incoming.command == "greet") {
closePopup();
document.getElementById("rl-version").innerText = `${version} - ${incoming.version}`;
document.getElementById("mc-version").innerText = `${version} - ${incoming.version}`;
if (incoming.version != serverVersion) {
displayError(`The server is on a different version than the client. Be wary of issues while using the client. (Expected "${serverVersion}", got "${incoming.version}")`);
};
ulist = incoming.ulist;
var ulstring = "";
for (const i in ulist) {
ulstring += `<span class="clickable" onclick="showUser('${ulist[i]}');">${ulist[i]}</span>` // fuck i love bad practices!!
if (i != ulist.length - 1) {
ulstring += ", "
};
};
document.getElementById("ms-ulist").innerHTML = `${ulist.length} users online (${ulstring})`;
posts = incoming.messages;
for (const i in incoming.messages) {
loadPost(incoming.messages[i], true, false);
};
if (localStorage.getItem("username") == null || localStorage.getItem("token") == null) {
scene = "register-login";
document.getElementById("loading").classList.toggle("hidden");
document.getElementById("register-login").classList.toggle("hidden")
} else {
username = localStorage.getItem("username").toLowerCase();
last_cmd = "login_token";
ws.send(JSON.stringify({command: "login_token", username: username, token: localStorage.getItem("token")}))
};
} else if (incoming.command == "ulist") {
ulist = incoming.ulist;
var ulstring = "";
for (const i in ulist) {
ulstring += `<span class="clickable" onclick="showUser('${ulist[i]}');">${ulist[i]}</span>` // fuck i love bad practices!!
if (i != ulist.length - 1) {
ulstring += ", "
};
};
document.getElementById("ms-ulist").innerHTML = `${ulist.length} users online (${ulstring})`;
};
if ("error" in incoming) {
if (incoming.error) {
if (incoming.code == "banned") {
displayError(`Account is banned until ${new Date(incoming.banned_until * 1000).toLocaleString()} for "${incoming.ban_reason}"`)
} else {
displayError(`We hit an error. ("${incoming.code}" from ${incoming.form})`);
};
} else if (last_cmd == "login_token" || last_cmd == "login_pswd") {
if (scene == "register-login") {
document.getElementById("register-login").classList.toggle("hidden");
} else if (scene == "loading") {
document.getElementById("loading").classList.toggle("hidden");
};
scene = "main-scene";
if ([JSON.stringify([]), JSON.stringify(["POST"])].includes(JSON.stringify(incoming.user.permissions))) {
document.getElementById("ms-button-mod").classList.add("hidden");
} else {
console.log(incoming.user.permissions)
document.getElementById("ms-button-mod").classList.remove("hidden");
};
document.getElementById("main-scene").classList.toggle("hidden");
document.getElementById("ms-name").innerText = `@${username}`
last_cmd = "get_inbox"
ws.send(JSON.stringify({command: "get_inbox"}))
};
};
if ("token" in incoming && incoming.listener == "RegisterLoginPswdListener") {
localStorage.setItem("username", username);
localStorage.setItem("token", incoming.token);
if (last_cmd == "register") {
window.location.reload();
};
logged_in = true;
} else if (incoming.command == "new_post") {
loadPost(incoming.data, false, false);
} else if (last_cmd == "gen_invite" && "invite_code" in incoming) {
document.getElementById("mm-invite-code").innerText = `Your invite code is "${incoming.invite_code}". Use it on any SoktDeer client to sign up!\nhttps://deer.meltland.dev/\n\nCodes: ${incoming.invite_codes}`
} else if (last_cmd == "get_inbox" && "inbox" in incoming) {
document.getElementById("mi-posts").innerHTML = ""
for (const i in incoming.inbox) {
loadPost(incoming.inbox[i], true, true);
};
if (localStorage.getItem("last_inbox_id") != incoming.inbox[0].id) {
document.getElementById("ms-button-inbox").innerText = "Inbox*";
localStorage.setItem("last_inbox_id", incoming.inbox[0].id)
} else {
document.getElementById("ms-button-inbox").innerText = "Inbox";
};
} else if (last_cmd == "get_user" && "user" in incoming) {
var bio;
if (incoming.user.bio == "") {bio = "This user does not have a bio."} else {bio = incoming.user.bio};
document.getElementById("ud-avatar").src = incoming.user.avatar;
document.getElementById("ud-display-name").innerText = incoming.user.display_name;
document.getElementById("ud-username").innerText = "@" + incoming.user.username;
document.getElementById("ud-created").innerText = new Date(incoming.user.created * 1000).toLocaleString();
document.getElementById("ud-permissions").innerText = `Permissions: ${incoming.user.permissions.toString().toLowerCase().replaceAll(",", ", ")}`;
document.getElementById("ud-special").innerHTML = ""
if (incoming.user.verified) {
document.getElementById("ud-special").innerHTML += "<br>Is verified"
};
if (incoming.user.bot) {
document.getElementById("ud-special").innerHTML += "<br>Is bot"
};
if (incoming.user.banned_until > new Date().getTime() / 1000) {
document.getElementById("ud-banned-span").innerText = `Banned until ${new Date(incoming.user.banned_until * 1000).toLocaleString()}`;
document.getElementById("ud-banned").classList.remove("hidden");
} else {
document.getElementById("ud-banned").classList.add("hidden");
};
document.getElementById("ud-bio").innerText = bio;
if (incoming.user.lastfm) {
document.getElementById("ud-lastfm-container").classList.add("hidden");
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var lfm = JSON.parse(xhttp.responseText);
console.log(lfm);
if (!"track" in lfm) {
document.getElementById("ud-lastfm-container").classList.add("hidden");
} else if (lfm.track["@attr"] && lfm.track["@attr"].nowplaying) {
document.getElementById("ud-lastfm-container").classList.remove("hidden")
document.getElementById("ud-lastfm-cover").src = lfm.track.image[lfm.track.image.length - 1]["#text"];
document.getElementById("ud-lastfm-name").innerText = lfm.track.name;
document.getElementById("ud-lastfm-album").innerText = `on "${lfm.track.album["#text"]}"`;
document.getElementById("ud-lastfm-artist").innerText = `by "${lfm.track.artist["#text"]}"`;
} else {
document.getElementById("ud-lastfm-container").classList.add("hidden");
};
}
};
xhttp.open("GET", `https://lastfm-last-played.biancarosa.com.br/${incoming.user.lastfm}/latest-song`, true);
xhttp.send();
} else {
document.getElementById("ud-lastfm-container").classList.add("hidden")
};
switchScene('user-display');
};
};
ws.onclose = function (event) {
closePopup();
switchScene("connection-lost");
};
ws.onerror = function (event) {
closePopup();
switchScene("connection-lost");
};
function switchScene (newScene) {
if (newScene == "main-inbox") {
last_cmd = "get_inbox"
ws.send(JSON.stringify({command: "get_inbox"}))
};
if (scene == "user-display") {
document.getElementById("ud-avatar").src = "default.jpeg";
};
document.getElementById(scene).classList.toggle("hidden");
document.getElementById(newScene).classList.toggle("hidden");
scene = newScene;
};
function register() {
last_cmd = "register";
username = document.getElementById("rl-username").value.toLowerCase();
ws.send(JSON.stringify({command: "register", username: username, password: document.getElementById("rl-password").value, invite_code: document.getElementById("rl-invitecode").value, listener: "RegisterLoginPswdListener"}))
};
function logIn() {
last_cmd = "login_pswd";
username = document.getElementById("rl-username").value.toLowerCase();
ws.send(JSON.stringify({command: "login_pswd", username: username, password: document.getElementById("rl-password").value, listener: "RegisterLoginPswdListener"}))
};
function logOut() {
localStorage.clear();
window.location.reload();
};
function loadPost(resf, isFetch, isInbox) {
console.log("Loading post " + resf.id)
var tsr = resf.created
var tsra = tsr * 1000
var tsrb = Math.trunc(tsra)
var ts = new Date();
ts.setTime(tsrb);
var sts = ts.toLocaleString();
var replies_loaded = ""
for (const i in resf.replies) {
replies_loaded += `→ ${resf.replies[i].author.display_name} (@${resf.replies[i].author.username}): ${resf.replies[i].content}`
if (i != resf.replies.length - 1) {
replies_loaded += "\n"
};
};
var post = document.createElement("div");
post.classList.add("post");
var avatar = document.createElement("img");
if (resf.author.avatar) {
avatar.src = resf.author.avatar;
} else {
avatar.src = "default.jpeg";
};
avatar.setAttribute("onerror", "this.src = 'default.jpeg';")
avatar.setAttribute("onclick", `showUser("${resf.author.username}");`);
avatar.classList.add("clickable");
avatar.classList.add("pfp");
post.appendChild(avatar);
var postUsername = document.createElement("span");
postUsername.innerHTML = `<b>${resf.author.display_name}</b> (<span class="mono">@${resf.author.username}</span>)`;
if (resf.author.verified) {
postUsername.innerHTML += ' <span class="mono">VERIFIED</span>'
};
if (resf.author.bot) {
postUsername.innerHTML += ' <span class="mono">BOT</span>'
};
postUsername.setAttribute("onclick", `showUser("${resf.author.username}");`);
postUsername.classList.add("clickable");
post.appendChild(postUsername);
var breaklineA = document.createElement("br");
post.appendChild(breaklineA);
var postDetails = document.createElement("small");
if (isInbox) {
postDetails.innerHTML = `${sts}`;
} else {
postDetails.innerHTML = `${sts} - <span class="text-clickable" onclick="reply(${resf.id});">Reply</span>`;
};
post.appendChild(postDetails);
var breaklineB = document.createElement("br");
post.appendChild(breaklineB);
if (resf.replies.length != 0) {
var replyContent = document.createElement("span");
replyContent.innerText = replies_loaded;
replyContent.classList.add("reply");
post.appendChild(replyContent);
var horlineB = document.createElement("hr");
post.appendChild(horlineB);
};
var postContent = document.createElement("span");
postContent.innerText = resf.content;
post.appendChild(postContent);
if (resf.attachments.length != 0) {
var horline = document.createElement("hr");
post.appendChild(horline);
var attachmentDetails = document.createElement("span");
for (const x in resf.attachments) {
attachmentDetails.innerHTML += `<a target="_blank" rel="noopener noreferrer" href="${resf.attachments[x]}">Attachment ${Number(x) + 1} (${resf.attachments[x]})</a><br>`
}
post.appendChild(attachmentDetails)
// i love making garbage code because im too lazy to learn how to make things properly
// not even a god can help me sobsob
var attachmentA = document.createElement("img");
attachmentA.src = resf.attachments[0]
attachmentA.classList.add("attachment")
attachmentA.setAttribute("onerror", "this.remove();")
post.appendChild(attachmentA);
if (resf.attachments.length >= 2) {
var attachmentB = document.createElement("img");
attachmentB.src = resf.attachments[1]
attachmentB.classList.add("attachment")
attachmentB.setAttribute("onerror", "this.remove();")
post.appendChild(attachmentB);
};
if (resf.attachments.length >= 3) {
var attachmentC = document.createElement("img");
attachmentC.src = resf.attachments[2]
attachmentC.classList.add("attachment")
attachmentC.setAttribute("onerror", "this.remove();")
post.appendChild(attachmentC);
};
};
var postboxid;
if (isInbox) {postboxid = "mi-posts"} else {postboxid = "ms-posts"};
if (isFetch) {
document.getElementById(postboxid).appendChild(post);
} else {
document.getElementById(postboxid).insertBefore(post, document.getElementById(postboxid).firstChild);
}
};
function sendPost() {
last_cmd = "post";
var content = document.getElementById("ms-msg").value;
if (replace_text) {
for (const i in text_replacements) {
content = content.replaceAll(i, text_replacements[i]);
};
};
ws.send(JSON.stringify({command: "post", content: content, replies: replies, attachments: attachments}))
document.getElementById("ms-msg").value = "";
attachments = [];
replies = [];
updateDetailsMsg();
};
function postInbox() {
last_cmd = "post_inbox";
ws.send(JSON.stringify({command: "post_inbox", content: document.getElementById("mm-content-inbox").value.replaceAll("\\n", "\n"), replies: [], attachments: []}))
document.getElementById("mm-content-inbox").value = "";
};
function ban() {
last_cmd = "post";
if (document.getElementById("mm-until-ban").value != "") {
var buntil = new Date(document.getElementById("mm-until-ban").value).getTime() / 1000
} else {
var buntil = 0
};
ws.send(JSON.stringify({command: "ban", username: document.getElementById("mm-username-ban").value, banned_until: buntil, ban_reason: document.getElementById("mm-reason-ban").value}))
document.getElementById("mm-username-ban").value = "";
document.getElementById("mm-until-ban").value = "";
document.getElementById("mm-reason-ban").value = "";
};
function genInviteCode() {
last_cmd = "gen_invite";
ws.send(JSON.stringify({command: "gen_invite"}))
};
function resetInvites() {
last_cmd = "reset_invites";
ws.send(JSON.stringify({command: "reset_invites"}))
};
function setDisplayName() {
last_cmd = "set_display_name";
ws.send(JSON.stringify({command: "set_display_name", display_name: document.getElementById("mc-display-name").value}))
document.getElementById("mc-display-name").value = "";
};
function setAvatar() {
last_cmd = "set_avatar";
ws.send(JSON.stringify({command: "set_avatar", avatar: document.getElementById("mc-avatar").value}))
document.getElementById("mc-avatar").value = "";
};
function setBio() {
last_cmd = "set_bio";
var bio = document.getElementById("mc-bio").value;
if (replace_text) {
for (const i in text_replacements) {
bio = bio.replaceAll(i, text_replacements[i]);
};
};
ws.send(JSON.stringify({command: "set_bio", bio: bio}))
document.getElementById("mc-bio").value = "";
};
function setLastfm() {
last_cmd = "set_lastfm";
ws.send(JSON.stringify({command: "set_lastfm", lastfm: document.getElementById("mc-lastfm").value}))
document.getElementById("mc-lastfm").value = "";
};
function updateDetailsMsg() {
if (replies.length == 0 && attachments.length == 0) {
document.getElementById("ms-details").innerText = ""
} else if (replies.length == 0) {
if (attachments.length == 1) {var plurals = ""} else {var plurals = "s"}
document.getElementById("ms-details").innerHTML = `${attachments.length} attachment${plurals} - <span class="text-clickable" onclick="clearAll();">Remove all</span>`
} else if (attachments.length == 0) {
if (replies.length == 1) {var plurals = "y"} else {var plurals = "ies"}
document.getElementById("ms-details").innerHTML = `${replies.length} repl${plurals} - <span class="text-clickable" onclick="clearAll();">Remove all</span>`
} else {
if (replies.length == 1) {var plurals = "y"} else {var plurals = "ies"}
if (attachments.length == 1) {var plurals_b = ""} else {var plurals_b = "s"}
document.getElementById("ms-details").innerHTML = `${replies.length} repl${plurals}, ${attachments.length} attachment${plurals_b} - <span class="text-clickable" onclick="clearAll();">Remove all</span>`
};
};
function addAttachment() {
var ata = window.prompt("Add an attachment", "Put a whitelisted URL here...")
if (![null,""].includes(ata)) {
if (attachments.length != 3) {
attachments.push(ata);
};
};
updateDetailsMsg();
};
function addUpload() {
if (settings.imgbb_key) {
document.getElementById("ms-attach").click()
} else {
displayError("Please set an ImgBB API key!");
};
};
async function attachFile() {
var iter = 0;
var fl = document.getElementById("ms-attach").files;
if (fl.length != 0) {
displayError("Uploading...");
var uploaded = true;
} else {
var uploaded = false;
};
for (const i in fl) {
if (fl[i] instanceof File) {
console.log(fl[i]);
iter += 1;
if (1 + attachments.length <= 3) {
try {
var f = await uploadFile(fl[i]);
attachments.push(f);
} catch(err) {
uploaded = false;
console.log(err);
displayError("Couldn't upload file to ImgBB.");
};
};
};
};
if (uploaded) {
closePopup();
};
document.getElementById("ms-attach").value = "";
updateDetailsMsg();
};
function reply(id) {
if (replies.length != 3) {
replies.push(id);
};
document.getElementById("ms-msg").focus();
updateDetailsMsg();
};
function clearAll() {
replies = [];
attachments = [];
updateDetailsMsg();
};
function clearHome() {
last_cmd = "clear_home";
ws.send(JSON.stringify({command: "clear_home"}))
};
function forceKick() {
last_cmd = "force_kick";
ws.send(JSON.stringify({command: "force_kick", username: document.getElementById("mm-username-forcekick").value}))
document.getElementById("mm-username-forcekick").value = "";
};
function showUser(user) {
last_cmd = "get_user";
ws.send(JSON.stringify({command: "get_user", username: user}))
};
function textinput() {
// what
};
function ping() {
ws.send(JSON.stringify({command: "ping"}))
};
setInterval(ping, 5000)
</script>
</body></html>