Calculator Tools Calculator Tools
Create

JunyTony ChatGPT

Jan 3, 2024

About this app

Have a fun and interactive conversation with JunyTony ChatGPT

JunyTony ChatGPT JunyTony ChatGPT Send

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>JunyTony ChatGPT</title>
<meta name="description" content="Have a fun and interactive conversation with JunyTony ChatGPT">
<meta name="keywords" content="chat, conversation, AI, JunyTony, ChatGPT">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
const inputField = document.getElementById('input-field');
const chatContainer = document.getElementById('chat-container');
const sendButton = document.getElementById('send-button');

sendButton.addEventListener('click', function() {
const message = inputField.value.trim();

if (message) {
// Display user message
const userMessage = document.createElement('div');
userMessage.classList.add('message');
userMessage.classList.add('user-message');
userMessage.textContent = message;

chatContainer.appendChild(userMessage);
chatContainer.scrollTop = chatContainer.scrollHeight;

// Clear input field
inputField.value = '';

// Simulate response after 1 second
setTimeout(function() {
// Display AI response
const aiMessage = document.createElement('div');
aiMessage.classList.add('message');
aiMessage.classList.add('ai-message');
aiMessage.textContent = 'This is the response from JunyTony ChatGPT.';

chatContainer.appendChild(aiMessage);
chatContainer.scrollTop = chatContainer.scrollHeight;
}, 1000);
}
});
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
body {
font-family: 'Roboto', sans-serif;
}

.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 10px;
background-color: #f9f9f9;
}

.message {
margin-bottom: 10px;
padding: 10px;
border-radius: 5px;
}

.user-message {
background-color: #e2f0fc;
}

.ai-message {
background-color: #d4edda;
}

.input-field {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
margin-bottom: 10px;
}

.send-button {
display: block;
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
background-color: #007bff;
color: #fff;
font-weight: bold;
text-align: center;
cursor: pointer;
}

.send-button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>JunyTony ChatGPT</h1>

<div id="chat-container"></div>

<input id="input-field" class="input-field" type="text" placeholder="Type your message...">
<button id="send-button" class="send-button">Send</button>
</div>
</body>
</html>