Changes to chatgenius.scroll.pub

root
root
25 days ago
Deleted index.scroll
index.scroll
Changed around line 0
- buildHtml
- baseUrl https://chatgenius.scroll.pub
- metaTags
- editButton /edit.html
- title ChatGenius - Your AI Chat Companion
- style.css
- body.html
- script.js
root
root
25 days ago
Initial commit
body.html
Changed around line 1
+
+

ChatGenius

+

Your AI Chat Companion

+
+
+
+
+
+
+
+
+
+
+
+
+
+

Powered by AI

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://chatgenius.scroll.pub
+ metaTags
+ editButton /edit.html
+ title ChatGenius - Your AI Chat Companion
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "a7ecbddf-cec8-4f18-aa82-34892a94700e",
+ "object": "chat.completion",
+ "created": 1735331224,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nchatgenius.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://chatgenius.scroll.pub\nmetaTags\neditButton /edit.html\ntitle ChatGenius - Your AI Chat Companion\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n

ChatGenius

\n

Your AI Chat Companion

\n
\n\n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n

Powered by AI

\n
\n---style.css---\n:root {\n --primary-color: #10a37f;\n --secondary-color: #ffffff;\n --background-color: #f7f7f7;\n --text-color: #333333;\n --border-radius: 8px;\n --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n}\n\nheader {\n background-color: var(--primary-color);\n color: var(--secondary-color);\n padding: 2rem;\n text-align: center;\n}\n\nh1 {\n margin: 0;\n font-size: 2.5rem;\n}\n\nmain {\n flex: 1;\n padding: 2rem;\n max-width: 800px;\n margin: 0 auto;\n width: 100%;\n}\n\n#chat-container {\n background-color: var(--secondary-color);\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n padding: 1.5rem;\n height: 70vh;\n display: flex;\n flex-direction: column;\n}\n\n#chat-history {\n flex: 1;\n overflow-y: auto;\n margin-bottom: 1rem;\n padding-right: 0.5rem;\n}\n\n.message {\n margin-bottom: 1rem;\n padding: 0.75rem;\n border-radius: var(--border-radius);\n max-width: 80%;\n}\n\n.user-message {\n background-color: var(--primary-color);\n color: var(--secondary-color);\n margin-left: auto;\n}\n\n.ai-message {\n background-color: #e9e9e9;\n margin-right: auto;\n}\n\n#input-area {\n display: flex;\n gap: 0.5rem;\n}\n\ntextarea {\n flex: 1;\n padding: 0.75rem;\n border: 1px solid #ddd;\n border-radius: var(--border-radius);\n resize: none;\n min-height: 50px;\n}\n\nbutton {\n background-color: var(--primary-color);\n color: var(--secondary-color);\n border: none;\n padding: 0.75rem 1.5rem;\n border-radius: var(--border-radius);\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: #0e8a6a;\n}\n\nfooter {\n background-color: var(--primary-color);\n color: var(--secondary-color);\n text-align: center;\n padding: 1rem;\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n \n main {\n padding: 1rem;\n }\n \n #chat-container {\n height: 60vh;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const chatHistory = document.getElementById('chat-history');\n const userInput = document.getElementById('user-input');\n const sendBtn = document.getElementById('send-btn');\n\n function addMessage(role, content) {\n const messageDiv = document.createElement('div');\n messageDiv.classList.add('message');\n messageDiv.classList.add(role === 'user' ? 'user-message' : 'ai-message');\n messageDiv.textContent = content;\n chatHistory.appendChild(messageDiv);\n chatHistory.scrollTop = chatHistory.scrollHeight;\n }\n\n async function sendMessage() {\n const message = userInput.value.trim();\n if (!message) return;\n\n addMessage('user', message);\n userInput.value = '';\n\n try {\n const response = await fetch('/api/chat', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ message }),\n });\n\n const data = await response.json();\n addMessage('ai', data.response);\n } catch (error) {\n addMessage('ai', 'Sorry, something went wrong. Please try again.');\n }\n }\n\n sendBtn.addEventListener('click', sendMessage);\n userInput.addEventListener('keydown', function(e) {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n sendMessage();\n }\n });\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 239,
+ "completion_tokens": 1164,
+ "total_tokens": 1403,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 239
+ },
+ "system_fingerprint": "fp_f1afce2943"
+ }
readme.scroll
Changed around line 1
+ # chatgenius.scroll.pub
+ Website generated by DeepSeek from prompt: Fully working ChatGPT clone
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', function() {
+ const chatHistory = document.getElementById('chat-history');
+ const userInput = document.getElementById('user-input');
+ const sendBtn = document.getElementById('send-btn');
+
+ function addMessage(role, content) {
+ const messageDiv = document.createElement('div');
+ messageDiv.classList.add('message');
+ messageDiv.classList.add(role === 'user' ? 'user-message' : 'ai-message');
+ messageDiv.textContent = content;
+ chatHistory.appendChild(messageDiv);
+ chatHistory.scrollTop = chatHistory.scrollHeight;
+ }
+
+ async function sendMessage() {
+ const message = userInput.value.trim();
+ if (!message) return;
+
+ addMessage('user', message);
+ userInput.value = '';
+
+ try {
+ const response = await fetch('/api/chat', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({ message }),
+ });
+
+ const data = await response.json();
+ addMessage('ai', data.response);
+ } catch (error) {
+ addMessage('ai', 'Sorry, something went wrong. Please try again.');
+ }
+ }
+
+ sendBtn.addEventListener('click', sendMessage);
+ userInput.addEventListener('keydown', function(e) {
+ if (e.key === 'Enter' && !e.shiftKey) {
+ e.preventDefault();
+ sendMessage();
+ }
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #10a37f;
+ --secondary-color: #ffffff;
+ --background-color: #f7f7f7;
+ --text-color: #333333;
+ --border-radius: 8px;
+ --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+ }
+
+ body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ margin: 0;
+ padding: 0;
+ background-color: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ }
+
+ header {
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ padding: 2rem;
+ text-align: center;
+ }
+
+ h1 {
+ margin: 0;
+ font-size: 2.5rem;
+ }
+
+ main {
+ flex: 1;
+ padding: 2rem;
+ max-width: 800px;
+ margin: 0 auto;
+ width: 100%;
+ }
+
+ #chat-container {
+ background-color: var(--secondary-color);
+ border-radius: var(--border-radius);
+ box-shadow: var(--box-shadow);
+ padding: 1.5rem;
+ height: 70vh;
+ display: flex;
+ flex-direction: column;
+ }
+
+ #chat-history {
+ flex: 1;
+ overflow-y: auto;
+ margin-bottom: 1rem;
+ padding-right: 0.5rem;
+ }
+
+ .message {
+ margin-bottom: 1rem;
+ padding: 0.75rem;
+ border-radius: var(--border-radius);
+ max-width: 80%;
+ }
+
+ .user-message {
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ margin-left: auto;
+ }
+
+ .ai-message {
+ background-color: #e9e9e9;
+ margin-right: auto;
+ }
+
+ #input-area {
+ display: flex;
+ gap: 0.5rem;
+ }
+
+ textarea {
+ flex: 1;
+ padding: 0.75rem;
+ border: 1px solid #ddd;
+ border-radius: var(--border-radius);
+ resize: none;
+ min-height: 50px;
+ }
+
+ button {
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ border: none;
+ padding: 0.75rem 1.5rem;
+ border-radius: var(--border-radius);
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+ }
+
+ button:hover {
+ background-color: #0e8a6a;
+ }
+
+ footer {
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ text-align: center;
+ padding: 1rem;
+ }
+
+ @media (max-width: 768px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ main {
+ padding: 1rem;
+ }
+
+ #chat-container {
+ height: 60vh;
+ }
+ }