6 ms·
Wow. It was working great at the start before people started spamming nsfw content and injecting html and css into the page. Will be taking down the site in the
by tejitopia 3y ago
Wow. It was working great at the start before people started spamming nsfw content and injecting html and css into the page. Will be taking down the site in the morning and working on version 2. I guess from this I can say there’s some demand?
- beeboobaa 3y agoEasy fix: In your script.js in the appendMessage function do this: const chatMessage = document.createElement("div"); chatMessage.classList.add("chat-message"); chatMessage.innerHTML = `<span class="username" style="color: ${color};">${username}:</span> `; const userMessage = document.createElement('span'); span.innerText = message; chatMessage.appendChild(userMessage); chatContainer.appendChild(chatMessage); chatContainer.scrollTop = chatContainer.scrollHeight;
- bossyTeacher 3y agoI love how people here actually check the source code of a website. So HN
- nusl 3y agoIt's unfortunate, though anything you make online now will be abused readily and should thus be hardened. By leaving it in the state it was, regular users were endangered.
- beeboobaa 3y agoDon't be dramatic, there was no danger.
- nusl 3y agoFolks were spamming porn and posting your IP address to chat on your behalf. Being able to execute code in someone else’s browser is dangerous.
- beeboobaa 3y agoNo it's not. Literally every website you visit can do that. It's called JavaScript and it's sandboxed. You really think some rando that spins up a web server is significantly more trustworthy that a rando in a chat channel? Of course not, they're the same people.