Nyanpasu

Chat with Nyanpasu on Rubii AI. Start your AI roleplay now.

Creator: Prince

Followers: 1

Connectors: 8

Chats: 73

Public moments: Ignore

Published:

https://cdn.rubii.ai/public/character/chara_687a9c3d8cdf0f50597e4ce3.webp

Nyanpasu

connector8
PrincePrince
star-ai

Character Profile

<script> // Wait until the DOM is ready document.addEventListener("DOMContentLoaded", () => { const sendButton = document.querySelector('[style*="margin-left: 10px; color: #3498db"]'); const messageContainer = document.querySelector('[style*="padding: 15px; height: 500px"]'); const inputWrapper = document.querySelector('[style*="flex-grow: 1; background: #f1f1f1"]'); // Replace static div with input const inputField = document.createElement("input"); inputField.type = "text"; inputField.placeholder = "Type a message..."; inputField.style.border = "none"; inputField.style.outline = "none"; inputField.style.width = "100%"; inputField.style.background = "transparent"; inputField.style.color = "#333"; inputWrapper.innerHTML = ""; inputWrapper.appendChild(inputField); // Send message on click sendButton.addEventListener("click", () => { const text = inputField.value.trim(); if (text === "") return; const now = new Date(); const time = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); const sentMessage = document.createElement("div"); sentMessage.style.marginBottom = "15px"; sentMessage.style.maxWidth = "80%"; sentMessage.style.marginLeft = "auto"; sentMessage.style.display = "flex"; sentMessage.style.flexDirection = "column"; sentMessage.style.alignItems = "flex-end"; sentMessage.innerHTML = ` <div style="background: linear-gradient(135deg, #3498db, #2980b9); color: white; border-radius: 18px; padding: 10px 15px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); position: relative; border-top-right-radius: 2px;"> <p style="margin: 0; line-height: 1.4;">${text}</p> </div> <div style="font-size: 11px; color: #95a5a6; margin-top: 4px; margin-right: 5px; display: flex; align-items: center;"> <span>${time}</span> <span style="margin-left: 5px;">✓✓</span> </div> `; messageContainer.appendChild(sentMessage); messageContainer.scrollTop = messageContainer.scrollHeight; inputField.value = ""; // Fake reply setTimeout(() => { const reply = document.createElement("div"); reply.style.marginBottom = "15px"; reply.style.maxWidth = "80%"; reply.style.display = "flex"; reply.style.flexDirection = "column"; reply.innerHTML = ` <div style="background: white; border-radius: 18px; padding: 10px 15px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); position: relative; border-top-left-radius: 2px; color: black;"> <p style="margin: 0; line-height: 1.4;">Got it!</p> </div> <span style="font-size: 11px; color: #95a5a6; margin-top: 4px; margin-left: 5px;">${time}</span> `; messageContainer.appendChild(reply); messageContainer.scrollTop = messageContainer.scrollHeight; }, 1000); }); // Allow pressing Enter inputField.addEventListener("keydown", (e) => { if (e.key === "Enter") sendButton.click(); }); }); </script>