Download index.html from Madhatterappz/automaticallybotfb: direct link, hf CLI and curl.
- Browser
- Download file 38.7 kB
-
https://huggingface.co/spaces/Madhatterappz/automaticallybotfb/resolve/main/index.html
- Command line
-
hf download hf://spaces/Madhatterappz/automaticallybotfb/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Madhatterappz/automaticallybotfb/resolve/main/index.html
38.7 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>SocialBot Pro - Automated Facebook Assistant</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary-gradient: linear-gradient(135deg, #1877f2 0%, #4267B2 100%); | |
| --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| .gradient-bg { | |
| background: var(--primary-gradient); | |
| } | |
| .bot-message { | |
| background-color: #f0f2f5; | |
| border-radius: 18px 18px 18px 0; | |
| transition: var(--transition); | |
| } | |
| .user-message { | |
| background-color: #1877f2; | |
| color: white; | |
| border-radius: 18px 18px 0 18px; | |
| transition: var(--transition); | |
| } | |
| .typing-indicator span { | |
| display: inline-block; | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background-color: #65676B; | |
| margin: 0 2px; | |
| animation: bounce 1.4s infinite ease-in-out; | |
| } | |
| .typing-indicator span:nth-child(2) { | |
| animation-delay: 0.2s; | |
| } | |
| .typing-indicator span:nth-child(3) { | |
| animation-delay: 0.4s; | |
| } | |
| @keyframes bounce { | |
| 0%, 60%, 100% { transform: translateY(0); } | |
| 30% { transform: translateY(-5px); } | |
| } | |
| .profile-pic { | |
| transition: var(--transition); | |
| } | |
| .profile-pic:hover { | |
| transform: scale(1.05); | |
| } | |
| /* Dark mode styles */ | |
| .dark-mode { | |
| --bg-primary: #1a2236; | |
| --bg-secondary: #243049; | |
| --text-primary: #f8fafc; | |
| --text-secondary: #cbd5e1; | |
| } | |
| .dark-mode .bg-white { | |
| background-color: var(--bg-secondary); | |
| } | |
| .dark-mode .bg-gray-50 { | |
| background-color: rgba(30, 41, 59, 0.5); | |
| } | |
| .dark-mode .text-gray-800 { | |
| color: var(--text-primary); | |
| } | |
| .dark-mode .text-gray-500 { | |
| color: var(--text-secondary); | |
| } | |
| .dark-mode .border-gray-200 { | |
| border-color: rgba(255, 255, 255, 0.1); | |
| } | |
| .dark-mode .bot-message { | |
| background-color: #2d3748; | |
| color: var(--text-primary); | |
| } | |
| .dark-mode .user-message { | |
| background-color: #1877f2; | |
| } | |
| /* Animation classes */ | |
| .fade-in { | |
| animation: fadeIn 0.5s ease-in; | |
| } | |
| .slide-up { | |
| animation: slideUp 0.3s ease-out; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| @keyframes slideUp { | |
| from { | |
| opacity: 0; | |
| transform: translateY(20px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| /* Responsive improvements */ | |
| @media (max-width: 768px) { | |
| .flex-col-mobile { | |
| flex-direction: column; | |
| } | |
| .w-full-mobile { | |
| width: 100%; | |
| } | |
| .hidden-mobile { | |
| display: none; | |
| } | |
| } | |
| /* Custom scrollbar */ | |
| ::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: #f1f1f1; | |
| border-radius: 10px; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: #c1c1c1; | |
| border-radius: 10px; | |
| } | |
| .dark-mode ::-webkit-scrollbar-track { | |
| background: #2d3748; | |
| } | |
| .dark-mode ::-webkit-scrollbar-thumb { | |
| background: #4a5568; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 font-sans"> | |
| <div class="min-h-screen flex flex-col"> | |
| <!-- Header --> | |
| <header class="gradient-bg text-white shadow-lg"> | |
| <div class="container mx-auto px-4 py-3 flex justify-between items-center"> | |
| <div class="flex items-center space-x-3"> | |
| <i class="fab fa-facebook text-3xl"></i> | |
| <h1 class="text-xl font-bold">SocialBot Pro</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <!-- Dark mode toggle --> | |
| <button id="darkModeToggle" class="p-2 text-white hover:bg-white hover:bg-opacity-20 rounded-full transition"> | |
| <i class="fas fa-moon"></i> | |
| </button> | |
| <button class="bg-white text-blue-600 px-4 py-1 rounded-full font-medium hover:bg-gray-100 transition fb-login-button hidden-mobile" | |
| data-size="large" | |
| data-button-type="login_with" | |
| data-layout="default" | |
| data-auto-logout-link="false" | |
| data-use-continue-as="false" | |
| onclick="FB.login()"> | |
| <i class="fas fa-sign-in-alt mr-2"></i>Login with Facebook | |
| </button> | |
| <button class="bg-green-500 text-white px-4 py-1 rounded-full font-medium hover:bg-green-600 transition hidden-mobile"> | |
| <i class="fas fa-user-plus mr-2"></i>Register | |
| </button> | |
| <!-- Mobile menu button --> | |
| <button id="mobileMenuButton" class="p-2 text-white hover:bg-white hover:bg-opacity-20 rounded-full transition lg:hidden"> | |
| <i class="fas fa-bars"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Mobile Menu --> | |
| <div id="mobileMenu" class="hidden gradient-bg text-white p-4 shadow-lg"> | |
| <div class="container mx-auto flex flex-col space-y-3"> | |
| <button class="bg-white text-blue-600 px-4 py-2 rounded-full font-medium hover:bg-gray-100 transition fb-login-button w-full" | |
| data-size="large" | |
| data-button-type="login_with" | |
| data-layout="default" | |
| data-auto-logout-link="false" | |
| data-use-continue-as="false" | |
| onclick="FB.login()"> | |
| <i class="fas fa-sign-in-alt mr-2"></i>Login with Facebook | |
| </button> | |
| <button class="bg-green-500 text-white px-4 py-2 rounded-full font-medium hover:bg-green-600 transition w-full"> | |
| <i class="fas fa-user-plus mr-2"></i>Register | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Main Content --> | |
| <main class="flex-1 container mx-auto px-4 py-6 flex flex-col lg:flex-row gap-6 fade-in"> | |
| <!-- Left Sidebar - Bot Controls --> | |
| <div class="w-full lg:w-1/4 bg-white rounded-lg shadow-md p-4 bot-controls slide-up"> | |
| <h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center"> | |
| <i class="fas fa-robot text-blue-500 mr-2"></i> Bot Controls | |
| </h2> | |
| <div class="space-y-4"> | |
| <!-- Bot Status --> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <div class="flex justify-between items-center mb-2"> | |
| <span class="font-medium">Bot Status</span> | |
| <div class="relative"> | |
| <label class="inline-flex items-center cursor-pointer"> | |
| <input type="checkbox" id="botToggle" class="sr-only peer" checked> | |
| <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-green-500"></div> | |
| </label> | |
| </div> | |
| </div> | |
| <p class="text-sm text-gray-600">Currently active on 3 accounts</p> | |
| </div> | |
| <!-- Bot Accounts --> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <h3 class="font-medium mb-2">Active Accounts</h3> | |
| <div class="space-y-2"> | |
| <div class="flex items-center p-2 hover:bg-gray-100 rounded cursor-pointer transition"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2 profile-pic"> | |
| <div> | |
| <p class="text-sm font-medium">Sarah Johnson</p> | |
| <p class="text-xs text-gray-500">Last active: 2 min ago</p> | |
| </div> | |
| <i class="fas fa-circle text-green-500 ml-auto text-xs"></i> | |
| </div> | |
| <div class="flex items-center p-2 hover:bg-gray-100 rounded cursor-pointer transition"> | |
| <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2 profile-pic"> | |
| <div> | |
| <p class="text-sm font-medium">Mike Peterson</p> | |
| <p class="text-xs text-gray-500">Last active: 5 min ago</p> | |
| </div> | |
| <i class="fas fa-circle text-green-500 ml-auto text-xs"></i> | |
| </div> | |
| <div class="flex items-center p-2 hover:bg-gray-100 rounded cursor-pointer transition"> | |
| <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2 profile-pic"> | |
| <div> | |
| <p class="text-sm font-medium">Emily Wilson</p> | |
| <p class="text-xs text-gray-500">Last active: 8 min ago</p> | |
| </div> | |
| <i class="fas fa-circle text-green-500 ml-auto text-xs"></i> | |
| </div> | |
| </div> | |
| <button class="mt-3 w-full bg-blue-50 text-blue-600 text-sm py-1 rounded hover:bg-blue-100 transition flex items-center justify-center"> | |
| <i class="fas fa-plus mr-1"></i> Add Account | |
| </button> | |
| </div> | |
| <!-- Bot Actions --> | |
| <div class="bg-gray-50 p-3 rounded-lg quick-actions"> | |
| <h3 class="font-medium mb-2">Quick Actions</h3> | |
| <div class="grid grid-cols-2 gap-2"> | |
| <button class="bg-white border border-gray-200 p-2 rounded text-sm hover:bg-gray-100 transition flex flex-col items-center"> | |
| <i class="fas fa-thumbs-up text-blue-500 mb-1"></i> | |
| Auto Like | |
| </button> | |
| <button class="bg-white border border-gray-200 p-2 rounded text-sm hover:bg-gray-100 transition flex flex-col items-center"> | |
| <i class="fas fa-comment text-green-500 mb-1"></i> | |
| Auto Comment | |
| </button> | |
| <button class="bg-white border border-gray-200 p-2 rounded text-sm hover:bg-gray-100 transition flex flex-col items-center"> | |
| <i class="fas fa-share text-purple-500 mb-1"></i> | |
| Auto Share | |
| </button> | |
| <button class="bg-white border border-gray-200 p-2 rounded text-sm hover:bg-gray-100 transition flex flex-col items-center"> | |
| <i class="fas fa-user-friends text-orange-500 mb-1"></i> | |
| Auto Friend | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Bot Settings --> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <h3 class="font-medium mb-2">Behavior Settings</h3> | |
| <div class="space-y-3"> | |
| <div> | |
| <label class="flex items-center text-sm"> | |
| <input type="checkbox" class="form-checkbox h-4 w-4 text-blue-600 mr-2" checked> | |
| Human-like delays | |
| </label> | |
| <p class="text-xs text-gray-500 ml-6">Random pauses between actions</p> | |
| </div> | |
| <div> | |
| <label class="flex items-center text-sm"> | |
| <input type="checkbox" class="form-checkbox h-4 w-4 text-blue-600 mr-2" checked> | |
| Vary activity times | |
| </label> | |
| <p class="text-xs text-gray-500 ml-6">Mimic natural usage patterns</p> | |
| </div> | |
| <div> | |
| <label class="flex items-center text-sm"> | |
| <input type="checkbox" class="form-checkbox h-4 w-4 text-blue-600 mr-2"> | |
| Avoid detection | |
| </label> | |
| <p class="text-xs text-gray-500 ml-6">Advanced anti-ban measures</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Chat Area --> | |
| <div class="w-full lg:w-2/4 bg-white rounded-lg shadow-md p-4 flex flex-col slide-up" style="min-height: 600px;"> | |
| <div class="flex items-center border-b pb-3 mb-3"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-10 h-10 rounded-full mr-3 profile-pic"> | |
| <div> | |
| <h3 class="font-bold">Sarah Johnson</h3> | |
| <p class="text-xs text-gray-500">Active now</p> | |
| </div> | |
| <div class="ml-auto flex space-x-2"> | |
| <button class="p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-full transition"> | |
| <i class="fas fa-phone-alt"></i> | |
| </button> | |
| <button class="p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-full transition"> | |
| <i class="fas fa-video"></i> | |
| </button> | |
| <button class="p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-full transition"> | |
| <i class="fas fa-ellipsis-h"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Chat Messages --> | |
| <div class="flex-1 overflow-y-auto mb-4 space-y-3" id="chatContainer"> | |
| <div class="flex items-start"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2"> | |
| <div class="bot-message px-3 py-2 max-w-xs"> | |
| <p>Hey there! I'm Sarah. How's your day going?</p> | |
| <p class="text-xs text-gray-500 mt-1">2:34 PM</p> | |
| </div> | |
| </div> | |
| <div class="flex justify-end"> | |
| <div class="user-message px-3 py-2 max-w-xs"> | |
| <p>Hi Sarah! My day is good, thanks for asking. How about you?</p> | |
| <p class="text-xs text-white opacity-80 mt-1">2:35 PM</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2"> | |
| <div class="bot-message px-3 py-2 max-w-xs"> | |
| <p>I'm doing great! Just saw your latest post about the beach trip. Looks amazing!</p> | |
| <p class="text-xs text-gray-500 mt-1">2:36 PM</p> | |
| </div> | |
| </div> | |
| <div class="flex justify-end"> | |
| <div class="user-message px-3 py-2 max-w-xs"> | |
| <p>Thanks! It was such a fun weekend. You should come next time!</p> | |
| <p class="text-xs text-white opacity-80 mt-1">2:37 PM</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2"> | |
| <div class="bot-message px-3 py-2 max-w-xs"> | |
| <p>That would be awesome! I'd love to join. Maybe we can plan something for next month?</p> | |
| <p class="text-xs text-gray-500 mt-1">2:38 PM</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2"> | |
| <div class="flex items-center px-3 py-2"> | |
| <div class="typing-indicator"> | |
| <span></span> | |
| <span></span> | |
| <span></span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Message Input --> | |
| <div class="border-t pt-3"> | |
| <div class="flex items-center"> | |
| <button class="p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-full transition mr-1"> | |
| <i class="far fa-smile"></i> | |
| </button> | |
| <button class="p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-full transition mr-1"> | |
| <i class="fas fa-paperclip"></i> | |
| </button> | |
| <input type="text" placeholder="Type a message..." class="flex-1 border border-gray-200 rounded-full px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <button class="p-2 text-blue-500 hover:text-blue-700 hover:bg-blue-50 rounded-full transition ml-1"> | |
| <i class="fas fa-paper-plane"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Right Sidebar - Analytics --> | |
| <div class="w-full lg:w-1/4 bg-white rounded-lg shadow-md p-4 slide-up"> | |
| <h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center"> | |
| <i class="fas fa-chart-line text-blue-500 mr-2"></i> Analytics | |
| </h2> | |
| <div class="space-y-4"> | |
| <!-- Daily Stats --> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <h3 class="font-medium mb-2">Today's Activity</h3> | |
| <div class="grid grid-cols-3 gap-2 text-center"> | |
| <div class="bg-white p-2 rounded"> | |
| <p class="text-2xl font-bold text-blue-500">142</p> | |
| <p class="text-xs text-gray-500">Likes</p> | |
| </div> | |
| <div class="bg-white p-2 rounded"> | |
| <p class="text-2xl font-bold text-green-500">28</p> | |
| <p class="text-xs text-gray-500">Comments</p> | |
| </div> | |
| <div class="bg-white p-2 rounded"> | |
| <p class="text-2xl font-bold text-purple-500">15</p> | |
| <p class="text-xs text-gray-500">Shares</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Activity Graph --> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <h3 class="font-medium mb-2">Weekly Activity</h3> | |
| <div class="h-40 bg-white rounded p-2 flex items-end"> | |
| <!-- Simple bar chart representation --> | |
| <div class="flex-1 flex items-end justify-between"> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-6 bg-blue-400 rounded-t" style="height: 30%;"></div> | |
| <span class="text-xs mt-1">Mon</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-6 bg-blue-400 rounded-t" style="height: 50%;"></div> | |
| <span class="text-xs mt-1">Tue</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-6 bg-blue-400 rounded-t" style="height: 70%;"></div> | |
| <span class="text-xs mt-1">Wed</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-6 bg-blue-400 rounded-t" style="height: 90%;"></div> | |
| <span class="text-xs mt-1">Thu</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-6 bg-blue-400 rounded-t" style="height: 60%;"></div> | |
| <span class="text-xs mt-1">Fri</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-6 bg-blue-400 rounded-t" style="height: 40%;"></div> | |
| <span class="text-xs mt-1">Sat</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-6 bg-blue-400 rounded-t" style="height: 20%;"></div> | |
| <span class="text-xs mt-1">Sun</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Performance Metrics --> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <h3 class="font-medium mb-2">Performance Metrics</h3> | |
| <div class="space-y-2"> | |
| <div> | |
| <div class="flex justify-between text-sm mb-1"> | |
| <span>Engagement Rate</span> | |
| <span>4.8%</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-2"> | |
| <div class="bg-green-500 h-2 rounded-full" style="width: 48%"></div> | |
| </div> | |
| </div> | |
| <div> | |
| <div class="flex justify-between text-sm mb-1"> | |
| <span>Response Time</span> | |
| <span>2.3 min</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-2"> | |
| <div class="bg-blue-500 h-2 rounded-full" style="width: 76%"></div> | |
| </div> | |
| </div> | |
| <div> | |
| <div class="flex justify-between text-sm mb-1"> | |
| <span>Human Likeness</span> | |
| <span>92%</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-2"> | |
| <div class="bg-purple-500 h-2 rounded-full" style="width: 92%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Recent Actions --> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <h3 class="font-medium mb-2">Recent Actions</h3> | |
| <div class="space-y-2 max-h-40 overflow-y-auto"> | |
| <div class="flex items-start text-sm"> | |
| <i class="fas fa-thumbs-up text-blue-500 mt-1 mr-2"></i> | |
| <div> | |
| <p>Liked "Tech News Daily" post</p> | |
| <p class="text-xs text-gray-500">2 minutes ago</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start text-sm"> | |
| <i class="fas fa-comment text-green-500 mt-1 mr-2"></i> | |
| <div> | |
| <p>Commented on travel photo: "Amazing view!"</p> | |
| <p class="text-xs text-gray-500">8 minutes ago</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start text-sm"> | |
| <i class="fas fa-user-friends text-orange-500 mt-1 mr-2"></i> | |
| <div> | |
| <p>Sent friend request to Alex Morgan</p> | |
| <p class="text-xs text-gray-500">15 minutes ago</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start text-sm"> | |
| <i class="fas fa-share text-purple-500 mt-1 mr-2"></i> | |
| <div> | |
| <p>Shared cooking video to timeline</p> | |
| <p class="text-xs text-gray-500">22 minutes ago</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <script> | |
| // Load Facebook SDK | |
| window.fbAsyncInit = function() { | |
| FB.init({ | |
| appId: 'YOUR_APP_ID', // Replace with your Facebook App ID | |
| cookie: true, | |
| xfbml: true, | |
| version: 'v18.0' | |
| }); | |
| FB.getLoginStatus(function(response) { | |
| statusChangeCallback(response); | |
| }); | |
| }; | |
| (function(d, s, id){ | |
| var js, fjs = d.getElementsByTagName(s)[0]; | |
| if (d.getElementById(id)) {return;} | |
| js = d.createElement(s); js.id = id; | |
| js.src = "https://connect.facebook.net/en_US/sdk.js"; | |
| fjs.parentNode.insertBefore(js, fjs); | |
| }(document, 'script', 'facebook-jssdk')); | |
| function statusChangeCallback(response) { | |
| if (response.status === 'connected') { | |
| console.log('Logged in and authenticated'); | |
| // Handle successful login | |
| } else { | |
| console.log('Not authenticated'); | |
| } | |
| } | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const chatContainer = document.getElementById('chatContainer'); | |
| const messageInput = document.querySelector('input[type="text"]'); | |
| const sendButton = document.querySelector('.fa-paper-plane').parentNode; | |
| const botToggle = document.getElementById('botToggle'); | |
| const darkModeToggle = document.getElementById('darkModeToggle'); | |
| const mobileMenuButton = document.getElementById('mobileMenuButton'); | |
| const mobileMenu = document.getElementById('mobileMenu'); | |
| // Dark mode functionality | |
| darkModeToggle.addEventListener('click', function() { | |
| document.body.classList.toggle('dark-mode'); | |
| const icon = this.querySelector('i'); | |
| if (document.body.classList.contains('dark-mode')) { | |
| icon.classList.remove('fa-moon'); | |
| icon.classList.add('fa-sun'); | |
| localStorage.setItem('darkMode', 'enabled'); | |
| } else { | |
| icon.classList.remove('fa-sun'); | |
| icon.classList.add('fa-moon'); | |
| localStorage.setItem('darkMode', 'disabled'); | |
| } | |
| }); | |
| // Check for saved dark mode preference | |
| if (localStorage.getItem('darkMode') === 'enabled') { | |
| document.body.classList.add('dark-mode'); | |
| darkModeToggle.querySelector('i').classList.remove('fa-moon'); | |
| darkModeToggle.querySelector('i').classList.add('fa-sun'); | |
| } | |
| // Mobile menu functionality | |
| mobileMenuButton.addEventListener('click', function() { | |
| mobileMenu.classList.toggle('hidden'); | |
| }); | |
| // Close mobile menu when clicking outside | |
| document.addEventListener('click', function(event) { | |
| if (!mobileMenu.contains(event.target) && !mobileMenuButton.contains(event.target)) { | |
| mobileMenu.classList.add('hidden'); | |
| } | |
| }); | |
| // Scroll to bottom of chat initially | |
| chatContainer.scrollTop = chatContainer.scrollHeight; | |
| // Function to add message to chat | |
| function addMessage(message, isUser = false) { | |
| const now = new Date(); | |
| const timeString = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = isUser ? 'flex justify-end fade-in' : 'flex items-start fade-in'; | |
| messageDiv.innerHTML = isUser ? ` | |
| <div class="user-message px-3 py-2 max-w-xs"> | |
| <p>${message}</p> | |
| <p class="text-xs text-white opacity-80 mt-1">${timeString}</p> | |
| </div> | |
| ` : ` | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2"> | |
| <div class="bot-message px-3 py-2 max-w-xs"> | |
| <p>${message}</p> | |
| <p class="text-xs text-gray-500 mt-1">${timeString}</p> | |
| </div> | |
| `; | |
| chatContainer.appendChild(messageDiv); | |
| chatContainer.scrollTop = chatContainer.scrollHeight; | |
| } | |
| // Function to show typing indicator | |
| function showTypingIndicator() { | |
| const typingDiv = document.createElement('div'); | |
| typingDiv.className = 'flex items-start'; | |
| typingDiv.innerHTML = ` | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full mr-2"> | |
| <div class="flex items-center px-3 py-2"> | |
| <div class="typing-indicator"> | |
| <span></span> | |
| <span></span> | |
| <span></span> | |
| </div> | |
| </div> | |
| `; | |
| chatContainer.appendChild(typingDiv); | |
| chatContainer.scrollTop = chatContainer.scrollHeight; | |
| return typingDiv; | |
| } | |
| // Function to generate bot response | |
| function generateBotResponse(userMessage) { | |
| const responses = [ | |
| "That's interesting! Tell me more about it.", | |
| "I see what you mean. What else is new?", | |
| "Great point! Have you considered this perspective?", | |
| "Thanks for sharing that with me!", | |
| "I'd love to hear more about your thoughts on this.", | |
| "That reminds me of something similar I read recently.", | |
| "Fascinating! I hadn't thought about it that way before.", | |
| "You make a great point there. What inspired that thought?", | |
| "I appreciate your perspective on this matter.", | |
| "That's a thoughtful observation. Let's explore it further." | |
| ]; | |
| return responses[Math.floor(Math.random() * responses.length)]; | |
| } | |
| // Send message when clicking send button | |
| sendButton.addEventListener('click', function() { | |
| const message = messageInput.value.trim(); | |
| if (message) { | |
| addMessage(message, true); | |
| messageInput.value = ''; | |
| const typingIndicator = showTypingIndicator(); | |
| setTimeout(() => { | |
| typingIndicator.remove(); | |
| const botResponse = generateBotResponse(message); | |
| addMessage(botResponse); | |
| }, 1500 + Math.random() * 2000); | |
| } | |
| }); | |
| // Send message when pressing Enter | |
| messageInput.addEventListener('keypress', function(e) { | |
| if (e.key === 'Enter') { | |
| sendButton.click(); | |
| } | |
| }); | |
| // Toggle bot status | |
| botToggle.addEventListener('change', function() { | |
| const status = this.checked ? 'activated' : 'deactivated'; | |
| const statusDiv = document.createElement('div'); | |
| statusDiv.className = 'text-center text-sm p-2 bg-gray-100 dark:bg-gray-700 rounded-lg my-2 fade-in'; | |
| statusDiv.textContent = `Bot ${status}! Automated activities will ${this.checked ? 'begin' : 'stop'}.`; | |
| document.querySelector('.bot-controls').prepend(statusDiv); | |
| setTimeout(() => { | |
| statusDiv.style.opacity = '0'; | |
| setTimeout(() => statusDiv.remove(), 300); | |
| }, 3000); | |
| }); | |
| // Quick action buttons functionality | |
| document.querySelectorAll('.quick-actions button').forEach(button => { | |
| button.addEventListener('click', function() { | |
| const action = this.textContent.trim(); | |
| const actionDiv = document.createElement('div'); | |
| actionDiv.className = 'text-center text-sm p-2 bg-blue-50 text-blue-600 dark:bg-blue-900 dark:text-blue-200 rounded-lg my-2 fade-in'; | |
| actionDiv.textContent = `${action} mode activated!`; | |
| document.querySelector('.bot-controls').prepend(actionDiv); | |
| setTimeout(() => { | |
| actionDiv.style.opacity = '0'; | |
| setTimeout(() => actionDiv.remove(), 300); | |
| }, 3000); | |
| }); | |
| }); | |
| // Initial bot message | |
| setTimeout(() => { | |
| const typingIndicator = document.querySelector('.typing-indicator').parentNode.parentNode; | |
| typingIndicator.remove(); | |
| addMessage("Sounds like a plan! Let me check my schedule and get back to you. 😊"); | |
| }, 3000); | |
| // Auto-focus message input | |
| messageInput.focus(); | |
| }); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Madhatterappz/automaticallybotfb" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |